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 handling of patterns that are method names #3680

Merged
merged 1 commit into from
Jul 29, 2016
Merged

Conversation

taion
Copy link
Contributor

@taion taion commented Jul 28, 2016

Fixes #3679.

Includes #3678 (needed for CI to pass).

PatternUtils is sort of a mess, incidentally. There's no reason to export compilePattern, and there's no real reason that getParams should still exist (nothing calls it). I also don't know why getRouteParams is completely separate module, either.

I want to fix/deprecate, but it's not that compelling right now.

@@ -41,4 +41,8 @@ describe('matchPattern', function () {
assertMatch('/**/*.jpg', '/files/path/to/file.jpg', '', [ 'splat', 'splat' ], [ 'files/path/to', 'file' ])
})

it('works with patterns that match built-in names', function () {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test case passes against master, but worth asserting here anyway.

Copy link
Member

Choose a reason for hiding this comment

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

Can you get it to fail against Firefox with 'watch'?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not here – matchPattern prepends a / to all patterns to match the pathname.

The failing test case is the getParamsName one, which currently would fail on all browsers.

@taion
Copy link
Contributor Author

taion commented Jul 29, 2016

Rebased

@timdorr timdorr merged commit 62af2ce into master Jul 29, 2016
@timdorr timdorr deleted the pattern-cache branch July 29, 2016 23:11
@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using a route of name 'watch' blows up in Firefox
2 participants