Only perpetrate the .toJSON hack on data caches when they are attached to a plain Javascript object. Part of the continuing saga of #8108.

This commit is contained in:
Dave Methvin 2011-02-15 22:41:08 -05:00 committed by Anton M
parent 5b38439011
commit b9f5e2b974
2 changed files with 10 additions and 7 deletions

View file

@ -338,18 +338,12 @@ test("data-* attributes", function() {
num++;
}
// TODO: Remove this hack which was introduced for 1.5.1
num--;
equals( num, check.length, "Make sure that the right number of properties came through." );
for ( var prop in obj2 ) {
num2++;
}
// TODO: Remove this hack which was introduced for 1.5.1
num2--;
equals( num2, check.length, "Make sure that the right number of properties came through." );
child.attr("data-other", "newvalue");