added data separation between the store and client...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2016-09-22 01:13:25 +03:00
parent 1da5dd7830
commit 56065a128c

View File

@ -141,11 +141,13 @@ module.pWikiData = {
// XXX should from be pattern compatible??? // XXX should from be pattern compatible???
data: function(path, value){ data: function(path, value){
if(value == null){ if(value == null){
return this.__data ? this.__data[path] : null return this.__data ?
JSON.parse(JSON.stringify(this.__data[path]))
: null
} else { } else {
this.__data = this.__data || {} this.__data = this.__data || {}
this.__data[path] = value this.__data[path] = JSON.parse(JSON.stringify(value))
return this return this
} }
}, },