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

IE11 error: startsWith not supported #35

Closed
stefano-1973 opened this issue Nov 10, 2021 · 3 comments · Fixed by #37
Closed

IE11 error: startsWith not supported #35

stefano-1973 opened this issue Nov 10, 2021 · 3 comments · Fixed by #37
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@stefano-1973
Copy link
Contributor

stefano-1973 commented Nov 10, 2021

The normalizeUrl and calculatePageTokenForUri functions in csrfguard.js use a function not supported by IE11: startsWith
For example in the js file there is this:

let normalizedUrl = url.startsWith('/') ? url : '/' + url;

I see that you have already created the function startsWith(s, prefix) but you have not used it in the above instruction (and other places)

@forgedhallpass
Copy link
Member

#31 would also solve this issue implicitly.

@stefano-1973
Copy link
Contributor Author

stefano-1973 commented Nov 10, 2021

I've created the pull request #37 for this issue

@forgedhallpass
Copy link
Member

Thanks @stefano-1973. Congrats for your first contribution!

Thinking out loud, I believe polyfills would have been another viable solution. The console.debugs should rather be removed through minification and the generated JS should be used in production instead, but this will be handled in #31 then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants