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){
61
61
var clonedBody = this . contentDocument . body . cloneNode ( true ) ;
62
62
var scripts = [ ] . slice . call ( clonedBody . getElementsByTagName ( "script" ) ) ;
63
63
scripts . forEach ( function ( script ) {
64
- if ( ! script . type || script . type . indexOf ( "javascript" ) >= 0 ) {
64
+ if ( ! script . type || script . type . indexOf ( "javascript" ) === - 1 ) {
65
65
script . parentNode . removeChild ( script ) ;
66
66
}
67
67
} ) ;
@@ -80,7 +80,7 @@ module.exports = function(node){
80
80
var scripts = [ ] . slice . call ( this . contentDocument . querySelectorAll ( "script" ) ) ;
81
81
// get the first one that is JS
82
82
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 &&
84
84
! scripts [ i ] . src ) ) {
85
85
source = scripts [ i ] . innerHTML ;
86
86
break ;
You can’t perform that action at this time.
0 commit comments