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

Commit 1e6a5b2

Browse files
caitppetebacondarwin
authored andcommitted
style(*): IE9 does still have issues with apply on some native functions
This partially reverts 8f05ca5 Related to #10242
1 parent 8f05ca5 commit 1e6a5b2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/ng/parse.js

+7-2
Original file line numberDiff line numberDiff line change
@@ -722,8 +722,13 @@ Parser.prototype = {
722722
ensureSafeObject(context, expressionText);
723723
ensureSafeFunction(fn, expressionText);
724724

725-
return ensureSafeObject(fn.apply(context, args), expressionText);
726-
};
725+
// IE doesn't have apply for some native functions
726+
var v = fn.apply
727+
? fn.apply(context, args)
728+
: fn(args[0], args[1], args[2], args[3], args[4]);
729+
730+
return ensureSafeObject(v, expressionText);
731+
};
727732
},
728733

729734
// This is used with json array declaration

0 commit comments

Comments
 (0)