File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -467,12 +467,17 @@ function $CompileProvider($provide) {
467467 addTextInterpolateDirective ( directives , node . nodeValue ) ;
468468 break ;
469469 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+ }
475477 }
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.)
476481 }
477482 break ;
478483 }
You can’t perform that action at this time.
0 commit comments