Bug Tracker

Opened 15 years ago

Closed 14 years ago

#3139 closed bug (wontfix)

qunit: calling serialArray( [ undefined ] ) throws TypeError

Reported by: mark Owned by: joern
Priority: minor Milestone: 1.3
Component: qunit Version: 1.2.6
Keywords: Cc:
Blocked by: Blocking:

Description

When two arrays are compared with isSet() and they are not the same then serialArray is called to display the actual and expected arrays. If serialArray is called with an array that has an undefined or null item in it then testrunner.js line 289:

var str = a[i].nodeName;

Throws a Type Error. Modifying this to:

var str = a[i] != undefined ? a[i].nodeName : undefined;

Appears to fix the problem.

Change History (1)

comment:1 Changed 14 years ago by joern

Resolution: wontfix
Status: newclosed

serialArray is deprecated already, isSet will probably be removed as well. Use jsDump.parse() instead of serialArray, it'll handle undefined values.

Note: See TracTickets for help on using tickets.