File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 55export const domArray = ( target , document ) => {
66 if ( typeof target === 'string' ) return Array . from ( document . querySelectorAll ( target ) )
77 if ( target . tagName ) return [ target ]
8- if ( target . jquery ) return target . toArray ( )
98 if ( Array . isArray ( target ) ) return target
10- return [ ]
9+ // Support NodeList and jQuery arrays
10+ return Array . from ( target )
1111}
1212
1313/**
@@ -18,6 +18,7 @@ export const domArray = (target, document) => {
1818export const domSelector = ( target , document ) => {
1919 if ( typeof target === 'string' ) return document . querySelector ( target )
2020 if ( target . tagName ) return target
21- if ( target . jquery ) return target [ 0 ]
21+ // Support NodeList and jQuery arrays
22+ if ( target [ 0 ] ) return target [ 0 ]
2223 return target
2324}
You can’t perform that action at this time.
0 commit comments