mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-12 11:57: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) {
|
addEventListener('message', function(e) {
|
||||||
if (e.data) {
|
if (e.data) {
|
||||||
try {
|
try {
|
||||||
importScripts('../' + e.data);
|
importScripts('../' + e.data);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
self._ = {};
|
self._ = { 'VERSION': e.message };
|
||||||
}
|
}
|
||||||
postMessage(_.VERSION);
|
postMessage(_.VERSION);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user