This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree 1 file changed +18
-14
lines changed
1 file changed +18
-14
lines changed Original file line number Diff line number Diff line change @@ -731,21 +731,25 @@ describe('parser', function() {
731
731
'Expression: apply()' ) ;
732
732
} ) ;
733
733
734
- it ( 'should NOT allow invocation to Function.bind' , function ( ) {
735
- scope . bind = Function . prototype . bind ;
736
734
737
- expect ( function ( ) {
738
- scope . $eval ( '$eval.bind()' ) ;
739
- } ) . toThrowMinErr (
740
- '$parse' , 'isecff' , 'Referencing call, apply or bind in Angular expressions is disallowed! ' +
741
- 'Expression: $eval.bind()' ) ;
742
-
743
- expect ( function ( ) {
744
- scope . $eval ( 'bind()' ) ;
745
- } ) . toThrowMinErr (
746
- '$parse' , 'isecff' , 'Referencing call, apply or bind in Angular expressions is disallowed! ' +
747
- 'Expression: bind()' ) ;
748
- } ) ;
735
+ // IE8 doesn't have Function.prototype.bind
736
+ if ( ! msie || msie > 8 ) {
737
+ it ( 'should NOT allow invocation to Function.bind' , function ( ) {
738
+ scope . bind = Function . prototype . bind ;
739
+
740
+ expect ( function ( ) {
741
+ scope . $eval ( '$eval.bind()' ) ;
742
+ } ) . toThrowMinErr (
743
+ '$parse' , 'isecff' , 'Referencing call, apply or bind in Angular expressions is disallowed! ' +
744
+ 'Expression: $eval.bind()' ) ;
745
+
746
+ expect ( function ( ) {
747
+ scope . $eval ( 'bind()' ) ;
748
+ } ) . toThrowMinErr (
749
+ '$parse' , 'isecff' , 'Referencing call, apply or bind in Angular expressions is disallowed! ' +
750
+ 'Expression: bind()' ) ;
751
+ } ) ;
752
+ }
749
753
} ) ;
750
754
751
755
describe ( 'Object constructor' , function ( ) {
You can’t perform that action at this time.
0 commit comments