Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#2930 closed defect (fixed)

dojo.number.parse throws an exception on empty string

Reported by: Douglas Hays Owned by: Adam Peller
Priority: high Milestone:
Component: General Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description

Calling dojo.number.parse with an empty string "" causes an exception. I'm using FF 2.0 on windows.

I think the solution is to add

if(typeof results[2] == 'undefined') { return NaN; }

immediately after

if(typeof absoluteMatch == 'undefined'
absoluteMatch == ""){

This is causing an exception to be thrown in Spinner.

Change History (2)

comment:1 Changed 13 years ago by Adam Peller

Resolution: fixed
Status: newclosed

(In [8498]) Handle parse of empty string. Fixes #2930

comment:2 Changed 12 years ago by (none)

Milestone: 0.9M2

Milestone 0.9M2 deleted

Note: See TracTickets for help on using tickets.