Hookup unhandledrejection and error events even the application is not running under development mode
This commit is contained in:
@@ -294,6 +294,7 @@ function initializeClient() {
|
|||||||
|
|
||||||
if (process.env.NODE_ENV === "development") {
|
if (process.env.NODE_ENV === "development") {
|
||||||
console.log("Currently in Development environment");
|
console.log("Currently in Development environment");
|
||||||
|
}
|
||||||
|
|
||||||
window.addEventListener("unhandledrejection", function(e) {
|
window.addEventListener("unhandledrejection", function(e) {
|
||||||
console.error("Error:", e);
|
console.error("Error:", e);
|
||||||
@@ -302,7 +303,6 @@ function initializeClient() {
|
|||||||
window.addEventListener("error", function(e) {
|
window.addEventListener("error", function(e) {
|
||||||
console.error("Error:", e);
|
console.error("Error:", e);
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
landingRoot.parentNode.removeChild(landingRoot);
|
landingRoot.parentNode.removeChild(landingRoot);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user