mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Ensure _.noConflict operates on root and not context.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user