forked from nodejs/node-v0.x-archive
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug nodejs#1 occurred when trying to use process.mixin on a function and produced a fatal exception. Bug nodejs#2 occurred when trying to do a deep merge with an object containing one or more objects with a nodeType property. In those cases the deep copy for this part of the object was not performed and a shallow one was performed instead. Both of these bugs were artifacts of the jQuery.extend port.
- Loading branch information
Showing
2 changed files
with
18 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
process.mixin(require("./common")); | ||
|
||
var target = function() {}; | ||
process.mixin(target, { | ||
foo: 'bar' | ||
}); | ||
|
||
assert.equal('bar', target.foo); | ||
|
||
// This test verifies there are no DOM-related aspects to process.mixin which | ||
// originally had been in there due to its jQuery origin. | ||
var fakeDomElement = {deep: {nodeType: 4}}; | ||
target = {}; | ||
process.mixin(true, target, fakeDomElement); | ||
|
||
assert.notStrictEqual(target.deep, fakeDomElement.deep); |