From 8b0314a965f93de1d42f5951430a3ffe74dce9f7 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Tue, 29 Nov 2022 02:49:58 +0900 Subject: [PATCH] Fix crashes when open the window --- app.js | 2 +- webloader.js | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/app.js b/app.js index 091aa0f..17ca71d 100644 --- a/app.js +++ b/app.js @@ -70,7 +70,7 @@ var console = { var params = { type: type, channel: 'default', - messsage: '', + message: '', datetime: new Date().toISOString() }; diff --git a/webloader.js b/webloader.js index aebbd91..b7f4ce7 100644 --- a/webloader.js +++ b/webloader.js @@ -9,7 +9,13 @@ var OldBrowser = require("lib/oldbrowser"); // Override global.console._echo() //////////////////////////////////////////////////////////////////////// global.console._echo = function(args, type) { - var heading, icon, msg = this._join(args); + var heading, icon, message = this._join(args); + var params = { + type: type, + channel: 'default', + message: '', + datetime: new Date().toISOString() + }; switch(type) { case "error": @@ -36,17 +42,17 @@ global.console._echo = function(args, type) { if (typeof(window.jQuery.toast) !== "undefined") { window.jQuery.toast({ heading: heading, - text: msg, + text: message, icon: icon }); } else { - window.alert(msg); + window.alert(message); } } catch (e) { window.alert(e.message); } - this._messages.push(msg); + this._messages.push(message); if (params.channel != "default" && this._echoCallback != null) { try {