ExtJS.Bugs: Difference between revisions
Jump to navigation
Jump to search
(New page: == ext-2.0.2\source\util\MixedCollection.js:83-84 == var old = this.map[key]; if ( old ) { Will fail if false boolean values (or other falsey values) are stored in the collection. Sug...) |
No edit summary |
||
Line 10: | Line 10: | ||
var old = this.map[key]; | var old = this.map[key]; | ||
if ( typeof old !== "undefined" ) { | if ( typeof old !== "undefined" ) { | ||
== ext-2.0.2\source\util\MixedCollection.js:391 == | |||
c[c.length] = {key: k[i], value: items[i], index: i}; | |||
Two scripted operations instead of one. Why? | |||
Suggested fix: | |||
c.push( {key: k[i], value: items[i], index: i} ); |
Revision as of 17:01, 29 May 2008
ext-2.0.2\source\util\MixedCollection.js:83-84
var old = this.map[key]; if ( old ) {
Will fail if false boolean values (or other falsey values) are stored in the collection.
Suggested fix:
var old = this.map[key]; if ( typeof old !== "undefined" ) {
ext-2.0.2\source\util\MixedCollection.js:391
c[c.length] = {key: k[i], value: items[i], index: i};
Two scripted operations instead of one. Why?
Suggested fix:
c.push( {key: k[i], value: items[i], index: i} );