Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#16612 closed defect (fixed)

dojox/mvc/StatefulArray - make it work without passing an array to the constructor

Reported by: ben hockey Owned by: Ed Chatelain
Priority: undecided Milestone: 1.8.4
Component: DojoX MVC Version: 1.8.3
Keywords: Cc:
Blocked By: Blocking:

Description

currently, this fails and it's annoying.

var arr = new StatefulArray();

a minor change will fix it

  • dojox/mvc/StatefulArray.js

     
    3535                //              - Setting an element to this array via set() - Stateful update is done for the new element as well as the new length.
    3636                //              - Setting a length to this array via set() - Stateful update is done for the removed/added elements as well as the new length.
    3737
    38                 var array = lang._toArray(a);
     38                var array = lang._toArray(a || []);
    3939                var ctor = StatefulArray;
    4040                ctor._meta = {bases: [Stateful]}; // For isInstanceOf()
    4141                array.constructor = ctor;

Change History (6)

comment:1 Changed 6 years ago by Ed Chatelain

Status: newassigned

Thanks Ben, do you want this in 1.8 or just in trunk?

comment:2 Changed 6 years ago by ben hockey

the 1.8 branch would be helpful for my immediate project if it's possible. i think it's probably something reasonable to include in that branch.

comment:3 Changed 6 years ago by Ed Chatelain

Type: enhancementdefect

Yes putting it into the 1.8 branch is not a problem.

comment:4 Changed 6 years ago by Ed Chatelain

In [30442]:

refs #16612 dojox/mvc/StatefulArray should work without passing an array to the constructor. Thanks neonstalwart. !strict

comment:5 Changed 6 years ago by Ed Chatelain

Resolution: fixed
Status: assignedclosed

In [30443]:

fixes #16612 dojox/mvc/StatefulArray should work without having to pass an array to the constructor. Thanks neonstalwart. !strict

comment:6 Changed 6 years ago by Ed Chatelain

Milestone: tbd1.8.4
Note: See TracTickets for help on using tickets.