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

Paths not matching after the first time #4

Open
chichilatte opened this issue Nov 9, 2015 · 0 comments
Open

Paths not matching after the first time #4

chichilatte opened this issue Nov 9, 2015 · 0 comments

Comments

@chichilatte
Copy link

I know this repo is a bit old now, but I've found it very useful. One problem I've run into (which may be caused by a change in the behaviour of as3 RegExp since the last commit?):

In the com.jeremyruppel.routing.rules.RegExpRule class, pattern executing returns null after the first time it's run. This is because all patterns seem to have the g flag on by default, which means the execute starts from where it left off (pattern.lastIndex).

To fix this I've added the line _pattern.lastIndex = 0 to RegExpRule matches() and execute() methods. Will do a quick fork + pull request...

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

No branches or pull requests

1 participant