I have the following funtion: function foo() { console.log( arguments ); // --> OK var e = arguments[0]; console.log( e ); // --> OK var p = arguments[0].parents( 'li' ); // --> problem occurs ONLY if this selection is empty // and empty selection is legit in my case // same behavior also when var p = e.parents( 'li' ) ;
console.log( arguments ); // --> if p.empty --> [ ], else OK console.log( e ); // --> if p.empty --> [ ], else OK console.log( p ); // --> OK } What am I missing? Thank you.