From a640fa76e2e72144f893a95dfc33dfcbfeba218f Mon Sep 17 00:00:00 2001 From: jahorton Date: Mon, 2 Dec 2019 07:57:13 +0700 Subject: [PATCH] fix(web): console obj validity check --- common/predictive-text/worker/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/predictive-text/worker/index.ts b/common/predictive-text/worker/index.ts index 212bab7a01..adff5b5118 100644 --- a/common/predictive-text/worker/index.ts +++ b/common/predictive-text/worker/index.ts @@ -132,7 +132,7 @@ class LMLayerWorker { let data = im as LoadMessage; if(data.model == this._currentModelSource) { // Some JS implementations don't allow web workers access to the console. - if(console) { + if(typeof console !== 'undefined') { console.warn("Duplicate model load message detected - squashing!"); } return;