mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Add console.log shim to avoid errors while deving.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user