views:

267

answers:

1

I've written a jQuery plugin and it was working well for all version up to 1.4.1. Now that jQuery was updated to 1.4.2 is stopped working entirely. I have a bunch of unit tests and in last version only 32 of 300+ pass.

I have checked 1.4.2 changelog but all it says is that there were some performance improvements and that's it.

Here's the changelog:

Performance Improvements:
· The performance of calling .bind() and .unbind().
· The performance of .empty(), .remove(), and .html().
· The performance of inserting a single DOM node into a document.
· The performace of calling $("body").

Bug Fixes:
· Remove existing foo[] when traditional = false in param.
· Problem with getJSON callback does not firing.
· Removed the Need for setArray.

I don't use any of the parts mentioned in bug fixes section. Were there any other changes in this version that could break my code? I don't really know where to start debugging.

My plugin code is available here and failing unit tests can be found here. Once again changing jQuery to 1.4.1 makes all unit tests to pass.

+1  A: 

I would suggest to check places where you call $.data() to retrieve value - it now returns null or undefined as I tested while mu plug-in stopped to work.

MBO
No I don't think that's the case. It was returning `undefined` before and it does so now.
RaYell
On the second thought, it's not exactly the problem but it's close. I was using `$.data()` instead of `$(selector).data()` and second method returns `null` if the value does not exists.
RaYell