From cc4f095995cc226aa0b8836b435083c4f8986526 Mon Sep 17 00:00:00 2001 From: NI Date: Thu, 19 Sep 2019 15:12:53 +0800 Subject: [PATCH] Hookup `unhandledrejection` and `error` events even the application is not running under development mode --- ui/app.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ui/app.js b/ui/app.js index 2588a1f..ae99a62 100644 --- a/ui/app.js +++ b/ui/app.js @@ -294,16 +294,16 @@ function initializeClient() { if (process.env.NODE_ENV === "development") { console.log("Currently in Development environment"); - - window.addEventListener("unhandledrejection", function(e) { - console.error("Error:", e); - }); - - window.addEventListener("error", function(e) { - console.error("Error:", e); - }); } + window.addEventListener("unhandledrejection", function(e) { + console.error("Error:", e); + }); + + window.addEventListener("error", function(e) { + console.error("Error:", e); + }); + landingRoot.parentNode.removeChild(landingRoot); let normalRoot = document.createElement("div");