Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha Premium Member
    Join Date
    Nov 2013
    Location
    India
    Posts
    4
    Vote Rating
    0
    shankarram is on a distinguished road

      0  

    Default Ext.util.Format.number returns Nan.undefined when NaN is provided as input

    Stand-Alone TestcaseExt version tested:
    • Ext 4.2.1
    • Ext 4.2.2
    Browser versions tested against:
    • IE9
    • IE8
    • FF26 (firebug 1.12.16 installed)
    • Chrome 31
    Description:
    • Ext.util.Format.number returns Nan.undefined when NaN is provided as input
    Steps to reproduce the problem:
    • Ext.util.Format.number(NaN, '0,000.00')
    The result that was expected:
    • ''
    The result that occurs instead:
    • Nan.undefined
    The following code has been removed from the number function of Ext 4.2.1 version and I couldn't find this removal of feature in the document:

    Code:
    v = Ext.Number.from(v, NaN);
    if (isNaN(v)) {
        return '';
    }

  2. #2
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    9,306
    Vote Rating
    253
    Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of

      0  

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha Premium Member Dejan Beciric's Avatar
    Join Date
    Feb 2014
    Location
    Belgrade, Serbia
    Posts
    48
    Vote Rating
    8
    Dejan Beciric will become famous soon enough

      0  

    Default

    Also, the same is when we pass a big number, for example:

    Ext.util.Format.number(1e+40, '0,000.00') - the result is 1e,+40.undefined

    Note:
    for Ext.util.Format.number(1e+10, '0,000.00') result is ok and as expected.