Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 87f65fd

Browse files
committed
fix(parse): support parsing objects created with null prototype
1 parent 443a43c commit 87f65fd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/ng/parse.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -946,10 +946,10 @@ function getterFn(path, options, fullExp) {
946946
return fn;
947947
}
948948

949-
var objectValueOf = Object.prototype.valueOf.call;
949+
var objectValueOf = Object.prototype.valueOf;
950950

951951
function getValueOf(value) {
952-
return isFunction(value.valueOf) ? value.valueOf() : objectValueOf(value);
952+
return isFunction(value.valueOf) ? value.valueOf() : objectValueOf.call(value);
953953
}
954954

955955
///////////////////////////////////

test/ng/parseSpec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1460,7 +1460,7 @@ describe('parser', function() {
14601460
expect(watcherCalls).toBe(1);
14611461
}));
14621462

1463-
it("should always reevaluate filters with non-primitive input created with Object.create(null)",
1463+
it("should always reevaluate filters with non-primitive input created with null prototype",
14641464
inject(function($parse) {
14651465
var filterCalls = 0;
14661466
$filterProvider.register('foo', valueFn(function(input) {

0 commit comments

Comments
 (0)