Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend with an empty var. #4454

Closed
creadivteam opened this issue Oct 7, 2019 · 3 comments · Fixed by #4707
Closed

Extend with an empty var. #4454

creadivteam opened this issue Oct 7, 2019 · 3 comments · Fixed by #4707

Comments

@creadivteam
Copy link

Version information

  • Laravel: v6.0.3
  • Voyager: v1.2
  • PHP: 7.3
  • Database: MySQL

Description

You can't extend default slugify char maps because you try to merge with an empty var.

Solution

Fix the condition before merge default map with the one you provide.
Annotation 2019-10-07 130829

@fletch3555
Copy link
Collaborator

This would be much better suited as a pull request.

@MrCrayon
Copy link
Collaborator

MrCrayon commented Dec 6, 2019

@creadivteam I'm no familiar with that part of code but what you posted as solution is what the code looks like right now.
Should we remove ! like this?

-           if (!this.settings.map) {      // Load extra character map translator
+           if (this.settings.map) {      // Load extra character map translator
                $.extend(this.chars, this.settings.map);
            }

Can you propose a PR?

@github-actions
Copy link
Contributor

github-actions bot commented Sep 7, 2020

This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants