Results 1 to 3 of 3

Thread: [4.1 RC 3] - Ext.iterate has a BUG

    You found a bug! We've classified it as EXTJS-6108 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Apr 2007
    Posts
    10
    Vote Rating
    0
      0  

    Default [4.1 RC 3] - Ext.iterate has a BUG

    PHP Code:
    var = {
    name:"test" 
    length"l1"
    }
    Ext.iterate(, function(k){
    .....
    }) 
    is wrong ......

    --------------
    if (Ext.isIterable(object)) {
    Ext.Array.each.call(Ext.Array, object, fn, scope);
    }
    else {
    Ext.Object.each.call(Ext.Object, object, fn, scope);
    }
    --------------

  2. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,061
    Vote Rating
    1388
      0  

    Default

    I'm going to open as a bug.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha Premium Member
    Join Date
    Jul 2009
    Posts
    33
    Vote Rating
    3
      0  

    Default

    Bug still exists in ExtJS 4.2.0.663

    The function should look like this to do not fail for objects containing a key called 'length'.

    Code:
    iterate: function(object, fn, scope) {
                if (Ext.isEmpty(object)) {
                    return;
                }
    
    
                if (scope === undefined) {
                    scope = object;
                }
    
    
                if (Ext.isArray(object)) {
                    Ext.Array.each.call(Ext.Array, object, fn, scope);
                }
                else {
                    Ext.Object.each.call(Ext.Object, object, fn, scope);
                }
            }

Posting Permissions

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