From 91d5acda6325caf91685da465d688527bd412b47 Mon Sep 17 00:00:00 2001 From: Jonathan Ginsburg Date: Fri, 4 Feb 2022 17:07:47 -0600 Subject: [PATCH] fix: remove string template from client code It is incompatible with IE. --- client/karma.js | 7 ++++++- static/karma.js | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/client/karma.js b/client/karma.js index b5a6f76b4..50651037b 100644 --- a/client/karma.js +++ b/client/karma.js @@ -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 } diff --git a/static/karma.js b/static/karma.js index 7d7e49a97..f0b2548af 100644 --- a/static/karma.js +++ b/static/karma.js @@ -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 }