Add existence check for runInContext. [closes #2694]

This commit is contained in:
John-David Dalton
2016-09-30 15:33:12 -07:00
parent 20fa52309c
commit 01c0950ae8

View File

@@ -12,7 +12,7 @@ function browserConvert(lodash, options) {
return baseConvert(lodash, lodash, options);
}
if (typeof _ == 'function') {
if (typeof _ == 'function' && typeof _.runInContext == 'function') {
_ = browserConvert(_.runInContext());
}
module.exports = browserConvert;