-
Notifications
You must be signed in to change notification settings - Fork 772
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 RegExp Issue in older versions of Safari #643
Conversation
Error is: TypeError: Cannot supply flags when constructing one RegExp from another. Discussion here: https://stackoverflow.com/questions/37919802/regex-created-with-constructor-not-working-with-safari
I just tested that expression on both Safari 10 and 11. The issue was opened in 2016 and looks like it's been resolved in the latest two versions of Safari, which is all we support. Thanks for the contribution, but it hardly seems necessary now. |
That's very unfortunate, as that is the single thing breaking safari 9 and older support :/ It's also a safe change, and the RegExp constructor does nothing but adds clutter and decreases performance. (As two regexps are constructed.) |
Hmm, I probably then have to fork & support a separate version for us. |
Alright, you've convinced me. I'll run this up to @ThomasBurleson but if it's minimal code and allows for Safari 9 support to be added back, I'm for it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@swftvsn please add a comment above the regex change explaining why it’s necessary |
Is the comment I added enough? |
@swftvsn Looks good, but @ThomasBurleson might suggest edits before it gets merged |
@swftvsn Looks like you've got some linting errors that need to be resolved. Other than that, tests look good. |
Fixed tslint errors. |
@swftvsn Pro tip: Just linking https://stackoverflow.com/questions/37919802 will resolve to the full URL |
Thanks! |
@swftvsn - please squash your commits. Thank you for this fix. |
Error is: TypeError: Cannot supply flags when constructing one RegExp from another. Discussion here: https://stackoverflow.com/questions/37919802/regex-created-with-constructor-not-working-with-safari
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
Haha, seems that I don't know how to do a squash. If I understand correctly the user interface of github allows this as part of the merge. However, I'm not allowed to merge, so I tried to pull my branch, and then do
But I think it's worse now. So, can you provide any assistance what should I do with that branch next? And how do I provide CLA. The committer is me. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Error is: TypeError: Cannot supply flags when constructing one RegExp from another.
Discussion here: https://stackoverflow.com/questions/37919802/regex-created-with-constructor-not-working-with-safari