From 9a147218ce81d2418b04a206b2cb8c474f8b1fb9 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sun, 17 Aug 2014 15:39:54 -0700 Subject: [PATCH] Add `console.log` shim to avoid errors while deving. --- test/asset/worker.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/asset/worker.js b/test/asset/worker.js index d925de523..ed40d4a7e 100644 --- a/test/asset/worker.js +++ b/test/asset/worker.js @@ -1,9 +1,12 @@ +if (!self.console) { + console = { 'log': function() {} }; +} addEventListener('message', function(e) { if (e.data) { try { importScripts('../' + e.data); } catch(e) { - self._ = {}; + self._ = { 'VERSION': e.message }; } postMessage(_.VERSION); }