Skip to content

Commit

Permalink
fix: remove string template from client code
Browse files Browse the repository at this point in the history
It is incompatible with IE.
  • Loading branch information
Jonathan Ginsburg committed Feb 5, 2022
1 parent 69cfc76 commit 91d5acd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion client/karma.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,12 @@ function Karma (updater, socket, iframe, opener, navigator, location, document)
}
if (returnUrl) {
if (!/^https?:\/\//.test(returnUrl)) {
throw new Error(`Security: Navigation to ${returnUrl} was blocked to prevent malicious exploits.`)
throw new Error(
'Security: Navigation to '.concat(
returnUrl,
' was blocked to prevent malicious exploits.'
)
)
}
location.href = returnUrl
}
Expand Down
7 changes: 6 additions & 1 deletion static/karma.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,12 @@ function Karma (updater, socket, iframe, opener, navigator, location, document)
}
if (returnUrl) {
if (!/^https?:\/\//.test(returnUrl)) {
throw new Error(`Security: Navigation to ${returnUrl} was blocked to prevent malicious exploits.`)
throw new Error(
'Security: Navigation to '.concat(
returnUrl,
' was blocked to prevent malicious exploits.'
)
)
}
location.href = returnUrl
}
Expand Down

0 comments on commit 91d5acd

Please sign in to comment.