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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix when baseurl is missing or empty in json #371

Merged
merged 3 commits into from Jan 12, 2020
Merged

Bugfix when baseurl is missing or empty in json #371

merged 3 commits into from Jan 12, 2020

Conversation

Ousret
Copy link
Contributor

@Ousret Ousret commented Jan 10, 2020

Hi 馃憢,

I am proposing this PR in order to fix bad url generation when using symfony flex, webpack encore and fosjsrouting json generation.

As a project can be hosted with different domain name, it is complicated to hardcode into our sources.

This is a minor change. We are verifying if baseurl exist and is not empty to use it as is, else we use window.location to guide us.

Thank you for this amazing project !

Bye.

Copy link
Collaborator

@tobias-93 tobias-93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Ousret,

Even if Javascript will parse your syntax correctly, I think it is clearer with an explicit () around the condition. Could you fix this and generate new generated files?

Thanks

Resources/js/router.js Outdated Show resolved Hide resolved
@Ousret Ousret requested a review from tobias-93 January 12, 2020 15:58
@tobias-93 tobias-93 merged commit 3c70635 into FriendsOfSymfony:master Jan 12, 2020
@tobias-93
Copy link
Collaborator

Thanks @Ousret

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants