-
Notifications
You must be signed in to change notification settings - Fork 559
Open
Description
I'm using lunr with es6 syntax which need babel to compile. but babel will always enable the strict mode which will make an error in following source code:
lunr.utils.warn = (function (global) {
/* eslint-disable no-console */
return function (message) {
if (global.console && console.warn) {
console.warn(message);
}
}
/* eslint-enable no-console */
})(this);
this
in strict mode will be undefined instead of the window
object .
By the way, I don't understand why using global.console
instead of console
, is it necessary for some edge case?
aciccarello, ribizli, nulladdict and oneumyvakin
Metadata
Metadata
Assignees
Labels
No labels