Skip to content

Commit 91d5acd

Browse files
author
Jonathan Ginsburg
committedFeb 5, 2022
fix: remove string template from client code
It is incompatible with IE.
1 parent 69cfc76 commit 91d5acd

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed
 

‎client/karma.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,12 @@ function Karma (updater, socket, iframe, opener, navigator, location, document)
240240
}
241241
if (returnUrl) {
242242
if (!/^https?:\/\//.test(returnUrl)) {
243-
throw new Error(`Security: Navigation to ${returnUrl} was blocked to prevent malicious exploits.`)
243+
throw new Error(
244+
'Security: Navigation to '.concat(
245+
returnUrl,
246+
' was blocked to prevent malicious exploits.'
247+
)
248+
)
244249
}
245250
location.href = returnUrl
246251
}

‎static/karma.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,12 @@ function Karma (updater, socket, iframe, opener, navigator, location, document)
250250
}
251251
if (returnUrl) {
252252
if (!/^https?:\/\//.test(returnUrl)) {
253-
throw new Error(`Security: Navigation to ${returnUrl} was blocked to prevent malicious exploits.`)
253+
throw new Error(
254+
'Security: Navigation to '.concat(
255+
returnUrl,
256+
' was blocked to prevent malicious exploits.'
257+
)
258+
)
254259
}
255260
location.href = returnUrl
256261
}

0 commit comments

Comments
 (0)
Please sign in to comment.