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(vue-app): apply path-to-regexp options to tokensToFunction regexp #6683

Merged
merged 1 commit into from
Nov 12, 2019

Conversation

pimlie
Copy link

@pimlie pimlie commented Nov 11, 2019

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Route params should be matched case insensitive, this wasnt the case as the path regexp sensitive option. This was originally fixed in pillarjs/path-to-regexp#191 but vue-router is still on path-to-regexp v1, so I've backported that fix which has now been released in https://github.com/pillarjs/path-to-regexp/releases/tag/v1.8.0

Related vue-router issue: vuejs/vue-router#2925

Note: actually the options arent used at all as we never pass options to compile/tokensToFunction. This actually means the default behaviour changes due to this pr from being case sensitive to case insensitive

Note 2: for a full fix its probably required to wait until a vue-router release has been released that uses path-to-regexp v1.8 or v3. Although in my tests that wasnt actually necessary, not sure exactly if/when vue-router will call tokensToFunction in a Nuxt.js app

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly. (PR: #)
  • I have added tests to cover my changes (if not applicable, please state why)
  • All new and existing tests are passing.

@pimlie pimlie requested a review from a team November 11, 2019 16:16
@clarkdo
Copy link
Member

clarkdo commented Nov 12, 2019

@pimlie Could you double check if it works as expected when enabling sensitive in IE ? I think IE doesn't support flags for RegExp.

@pimlie
Copy link
Author

pimlie commented Nov 12, 2019

Tested with IE11:
image

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

Successfully merging this pull request may close these issues.

3 participants