Skip to content

Commit 26b5ae4

Browse files
committed
fix __proto__ for ie.
1 parent 14fe8cf commit 26b5ae4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/JsonTest.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ JsonTest.prototype.testItShouldPreventRecursion = function () {
7575
};
7676

7777
JsonTest.prototype.testItShouldSerializeOnlyOwnProperties = function() {
78-
var parent = { p: 'p'};
79-
var child = { c: 'c'};
80-
child.__proto__ = parent;
81-
assertEquals('{"c":"c"}', angular.toJson(child));
82-
}
78+
var parent = createScope();
79+
var child = createScope(parent);
80+
child.c = 'c';
81+
expect(angular.toJson(child)).toEqual('{"c":"c"}');
82+
};
8383

8484
JsonTest.prototype.testItShouldSerializeSameObjectsMultipleTimes = function () {
8585
var obj = {a:'b'};

0 commit comments

Comments
 (0)