File tree Expand file tree Collapse file tree 2 files changed +2
-0
lines changed
platform/mv3/extension/js/scripting Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -119,6 +119,7 @@ class PSelectorMatchesAttrTask extends PSelectorTask {
119119 this . reValue = regexFromString ( task [ 1 ] . value , true ) ;
120120 }
121121 transpose ( node , output ) {
122+ if ( typeof node . getAttributeNames !== 'function' ) { return ; }
122123 const attrs = node . getAttributeNames ( ) ;
123124 for ( const attr of attrs ) {
124125 if ( this . reAttr . test ( attr ) === false ) { continue ; }
Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ class PSelectorMatchesAttrTask extends PSelectorTask {
9999 this . reValue = regexFromString ( task [ 1 ] . value , true ) ;
100100 }
101101 transpose ( node , output ) {
102+ if ( typeof node . getAttributeNames !== 'function' ) { return ; }
102103 const attrs = node . getAttributeNames ( ) ;
103104 for ( const attr of attrs ) {
104105 if ( this . reAttr . test ( attr ) === false ) { continue ; }
You can’t perform that action at this time.
0 commit comments