File tree 1 file changed +10
-5
lines changed
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -467,12 +467,17 @@ function $CompileProvider($provide) {
467
467
addTextInterpolateDirective ( directives , node . nodeValue ) ;
468
468
break ;
469
469
case 8 : /* Comment */
470
- match = COMMENT_DIRECTIVE_REGEXP . exec ( node . nodeValue ) ;
471
- if ( match ) {
472
- nName = directiveNormalize ( match [ 1 ] ) ;
473
- if ( addDirective ( directives , nName , 'M' , maxPriority ) ) {
474
- attrs [ nName ] = trim ( match [ 2 ] ) ;
470
+ try {
471
+ match = COMMENT_DIRECTIVE_REGEXP . exec ( node . nodeValue ) ;
472
+ if ( match ) {
473
+ nName = directiveNormalize ( match [ 1 ] ) ;
474
+ if ( addDirective ( directives , nName , 'M' , maxPriority ) ) {
475
+ attrs [ nName ] = trim ( match [ 2 ] ) ;
476
+ }
475
477
}
478
+ } catch ( e ) {
479
+ // turns out that under some circumstances IE9 throws errors when one attempts to read comment's node value.
480
+ // Just ignore it and continue. (Can't seem to reproduce in test case.)
476
481
}
477
482
break ;
478
483
}
You can’t perform that action at this time.
0 commit comments