#2370 closed defect (fixed)
Copy-Paste error in dojo.collections.Store
Reported by: | guest | Owned by: | Tom Trenka |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Collections | Version: | 0.4.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
In the dojo.collections.Store
class, a copy-paste error occured when coding the addDataRange
method.
In fact, addDataRange
method uses the code of the addData
method. Here is the bug :
this.addDataRange = function(/*array*/arr){ // summary // Add a range of objects to the internal data array. var objects=[]; for(var i=0; i<arr.length; i++){ var k = arr[i][this.keyField]; if(this.getByKey(k)){ var o = this.getByKey(k); o.src = obj; } else { var o = { key:k, src:arr[i] }; data.push(o); } objects.push(o); } this.onAddDataRange(objects); };
During execution, a Javascript error "obj is not defined" shows up. In the for loop, the line :
o.src = obj;
may be :
o.src = arr[i];
Change History (4)
comment:1 Changed 14 years ago by
Milestone: | → 0.9 |
---|
comment:2 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:3 Changed 14 years ago by
Milestone: | 0.9 → 0.4.2 |
---|
Note: See
TracTickets for help on using
tickets.
(In [7161]) Fixes #2370.