Bug Tracker

Opened 11 years ago

Closed 11 years ago

#12467 closed bug (invalid)

jQuery each leads to several errors

Reported by: [email protected] Owned by: [email protected]
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.1
Keywords: Cc:
Blocked by: Blocking:

Description

Hey guys,

i got lots of errors, esp. in IE when using appendTo(). These were caused by trying to get obj.length in jQuery.each() [about line 580] where obj is not an object. I fixed this by adding

if (typeof obj == 'undefined') obj = new Object();

as first line of jQuery.each(). I hope this helps.

Greetings,

  1. Tietz

Change History (3)

comment:1 Changed 11 years ago by timmywil

Owner: set to [email protected]
Status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.

Additionally, be sure to test against the jQuery git("edge") version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/. Open the link and click to "Fork" (in the top menu) to get started.

comment:2 Changed 11 years ago by [email protected]

Status: pendingnew

I fear, this will be slightly impossible for me, because it was a large customer's project with a lot of very different JavaScripts. But it looks like slimbox2 triggered the error in line 33.

Regards

comment:3 Changed 11 years ago by mikesherov

Resolution: invalid
Status: newclosed

Thanks for contributing! Please speak to the plugins author if you'd like to pursue fixing the issue further, but this is not a bug in Jquery core itself.

Note: See TracTickets for help on using tickets.