Commit 221fb797 by Иван Кубота

experimental prop. for back compat until wip

parent 49ca24e3
......@@ -9,6 +9,7 @@ const Store = function(cfg) {
};
Store.prototype = {
experimental: false,
_set: function(keys, val, pointer, path){
let i, _i;
let key = keys[path.length];
......@@ -25,6 +26,13 @@ Store.prototype = {
}
},
set: function(key, val) {
if(!this.experimental)
if(this._props[key] !== val){
this._props[ key ] = val;
this.fire( 'change', key, val );
this.fire( key, val );
}
return this._set(
typeof key === 'string' ? key.split('.') : key,
val,
......@@ -33,6 +41,9 @@ Store.prototype = {
);
},
get: function(key, returnLastStore) {
if(!this.experimental)
return this._props[key];
key = typeof key === 'string' ? key.split('.') : key;
let ref = this,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment