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

Fix new page url with options #6

Merged
merged 1 commit into from
Oct 12, 2015
Merged

Fix new page url with options #6

merged 1 commit into from
Oct 12, 2015

Conversation

jkrems
Copy link
Member

@jkrems jkrems commented Oct 12, 2015

Comes down to a missing return that led to an undefined url.

@@ -30,7 +30,7 @@ function trimHash(url) {
}

function normalizeOptions(options) {
options.url = trimHash(options.url);
options.url = trimHash(options.url || '/');
Copy link

Choose a reason for hiding this comment

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

options.url = trimHash(options.url) || '/';

?

Copy link
Member Author

Choose a reason for hiding this comment

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

The problem is that trimHash will throw and kill the proxy if options.url is undefined. So the || has to be inside of the call.

Copy link

Choose a reason for hiding this comment

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

Ahh OK gotcha

@ghost
Copy link

ghost commented Oct 12, 2015

:shipit:

jkrems added a commit that referenced this pull request Oct 12, 2015
Fix new page url with options
@jkrems jkrems merged commit 47f2cff into master Oct 12, 2015
@jkrems jkrems deleted the jk-options branch October 12, 2015 19:26
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.

1 participant