mirror of
https://bitbucket.org/bellord13/kit.git
synced 2026-11-13 19:06:11 +03:00
fix
This commit is contained in:
@@ -43,12 +43,12 @@ kit.PluginManager.register('Collection', function(module, exports, require, glob
|
||||
}
|
||||
|
||||
if(Array.isArray(data)) {
|
||||
this.__type = 'array';
|
||||
this.__type = 'array'; // []
|
||||
}
|
||||
else if(typeof data === 'object') {
|
||||
this.__type = 'object';
|
||||
this.__type = 'object'; // {}
|
||||
if(data.hasOwnProperty('length') && !Object.keys(data).includes('length')) {
|
||||
this.__type = 'arrayObject';
|
||||
this.__type = 'arrayObject'; // args
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -88,7 +88,7 @@ kit.PluginManager.register('Collection', function(module, exports, require, glob
|
||||
Collection.prototype.toArray = function () {
|
||||
var index, arr = [];
|
||||
for(index in this.__keys) {
|
||||
arr.push(this.__values[index]);
|
||||
arr[this.__keys[index]] = this.__values[index];
|
||||
}
|
||||
return arr;
|
||||
};
|
||||
@@ -122,7 +122,7 @@ kit.PluginManager.register('Collection', function(module, exports, require, glob
|
||||
this.data[key] = this.__values[index = this.indexKey(key)] = value;
|
||||
return this;
|
||||
}
|
||||
this.length = this.__keys.push(safeArrayKey(key));
|
||||
this.__keys.push(safeArrayKey(key));
|
||||
this.data[key] = this.__values[this.length-1] = value;
|
||||
return this;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user