File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ module.exports = function(node){
6161 var clonedBody = this . contentDocument . body . cloneNode ( true ) ;
6262 var scripts = [ ] . slice . call ( clonedBody . getElementsByTagName ( "script" ) ) ;
6363 scripts . forEach ( function ( script ) {
64- if ( ! script . type || script . type . indexOf ( "javascript" ) >= 0 ) {
64+ if ( ! script . type || script . type . indexOf ( "javascript" ) === - 1 ) {
6565 script . parentNode . removeChild ( script ) ;
6666 }
6767 } ) ;
@@ -80,7 +80,7 @@ module.exports = function(node){
8080 var scripts = [ ] . slice . call ( this . contentDocument . querySelectorAll ( "script" ) ) ;
8181 // get the first one that is JS
8282 for ( var i = 0 ; i < scripts . length ; i ++ ) {
83- if ( ! scripts [ i ] . type || ( scripts [ i ] . type . indexOf ( "javascript" ) == = 0 &&
83+ if ( ! scripts [ i ] . type || ( scripts [ i ] . type . indexOf ( "javascript" ) > = 0 &&
8484 ! scripts [ i ] . src ) ) {
8585 source = scripts [ i ] . innerHTML ;
8686 break ;
You can’t perform that action at this time.
0 commit comments