From c822e61fc45091ecd7c356970af0e4eb72c8ea2e Mon Sep 17 00:00:00 2001 From: jahorton Date: Thu, 21 Nov 2019 08:58:43 +0700 Subject: [PATCH] change(lmlayer): Fixes a few of the 'draft' tweaks to logging from previous commits of this PR --- common/predictive-text/index.ts | 1 - common/predictive-text/worker/index.ts | 7 ++++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/common/predictive-text/index.ts b/common/predictive-text/index.ts index 9b11d1a4d2..921fc7e5a1 100644 --- a/common/predictive-text/index.ts +++ b/common/predictive-text/index.ts @@ -151,7 +151,6 @@ namespace com.keyman.text.prediction { } else if (payload.message === 'ready') { this._declareLMLayerReady(event.data.configuration); - console.log("LMLayer ready!"); } else if (payload.message === 'suggestions') { this._predictPromises.keep(payload.token, payload.suggestions); } else if (payload.message === 'currentword') { diff --git a/common/predictive-text/worker/index.ts b/common/predictive-text/worker/index.ts index f64e10e875..212bab7a01 100644 --- a/common/predictive-text/worker/index.ts +++ b/common/predictive-text/worker/index.ts @@ -131,9 +131,10 @@ class LMLayerWorker { if(im.message == 'load') { let data = im as LoadMessage; if(data.model == this._currentModelSource) { - // if(console) { - // console.warn("Duplicate model load message detected - squashing!"); - // } + // Some JS implementations don't allow web workers access to the console. + if(console) { + console.warn("Duplicate model load message detected - squashing!"); + } return; } else { this._currentModelSource = data.model;