Ensure _.noConflict operates on root and not context.

This commit is contained in:
jdalton
2015-06-25 08:03:38 -07:00
parent 9f3d284c68
commit 1881f5cb39
2 changed files with 13 additions and 6 deletions

View File

@@ -738,7 +738,7 @@
var objToString = objectProto.toString;
/** Used to restore the original `_` reference in `_.noConflict`. */
var oldDash = context._;
var oldDash = root._;
/** Used to detect if a method is native. */
var reIsNative = RegExp('^' +
@@ -11558,7 +11558,7 @@
* var lodash = _.noConflict();
*/
function noConflict() {
context._ = oldDash;
root._ = oldDash;
return this;
}