Results 1 to 3 of 3

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

    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
      0  

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

    Stand-Alone Testcase
    Ext 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
    10,396
    Vote Rating
    264
      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
      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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •