Permalink
Browse files

better use of regex

  • Loading branch information...
1 parent b748a8f commit 6612507656ce617c09d8d94209da579cdab161ce @gibson042 committed Jul 18, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/manipulation.js
View
@@ -377,7 +377,7 @@ jQuery.fn.extend({
// Evaluate executable scripts on first document insertion
for ( i = 0; i < hasScripts; i++ ) {
node = scripts[ i ];
- if ( ( !node.type || rscriptType.test( node.type ) ) &&
+ if ( rscriptType.test( node.type || "" ) &&
!jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
if ( node.src ) {
@@ -821,7 +821,7 @@ jQuery.extend({
// Capture executables
if ( scripts ) {
for ( j = 0; (safe = div[j]) != null; j++ ) {
- if ( !safe.type || rscriptType.test( safe.type ) ) {
+ if ( rscriptType.test( safe.type || "" ) ) {
scripts.push( safe );
}
}

0 comments on commit 6612507

Please sign in to comment.