From d20f7514412518a82ec306f7ecc09fed1afa742e Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Fri, 15 Feb 2019 13:01:28 +0100 Subject: [PATCH] Throw correct Error object We've already defined the name Error as a logging function, so we need to be more explicit when we want to refer to the exception class. --- kasmweb/core/util/logging.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kasmweb/core/util/logging.js b/kasmweb/core/util/logging.js index 036a7dd..4c8943d 100644 --- a/kasmweb/core/util/logging.js +++ b/kasmweb/core/util/logging.js @@ -40,7 +40,7 @@ export function init_logging(level) { case 'none': break; default: - throw new Error("invalid logging type '" + level + "'"); + throw new window.Error("invalid logging type '" + level + "'"); } /* eslint-enable no-console, no-fallthrough */ }