File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -226,17 +226,21 @@ function JQLite(element) {
226
226
if ( element instanceof JQLite ) {
227
227
return element ;
228
228
}
229
+
230
+ var argIsString ;
231
+
229
232
if ( isString ( element ) ) {
230
233
element = trim ( element ) ;
234
+ argIsString = true ;
231
235
}
232
236
if ( ! ( this instanceof JQLite ) ) {
233
- if ( isString ( element ) && element . charAt ( 0 ) != '<' ) {
237
+ if ( argIsString && element . charAt ( 0 ) != '<' ) {
234
238
throw jqLiteMinErr ( 'nosel' , 'Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element' ) ;
235
239
}
236
240
return new JQLite ( element ) ;
237
241
}
238
242
239
- if ( isString ( element ) ) {
243
+ if ( argIsString ) {
240
244
jqLiteAddNodes ( this , jqLiteParseHTML ( element ) ) ;
241
245
} else {
242
246
jqLiteAddNodes ( this , element ) ;
You can’t perform that action at this time.
0 commit comments