@live-change/framework
Advanced tools
Comparing version 0.3.21 to 0.3.22
@@ -51,6 +51,6 @@ const ReactiveDao = require("@live-change/dao") | ||
const data = obj && objectMapper(obj, ind) | ||
const oldData = objectState.data | ||
const oldData = objectState.data && objectMapper(objectState.data, ind) | ||
output.change(data, oldData) | ||
if(data) { | ||
objectState.data = data | ||
objectState.data = obj | ||
} else if(oldObj) { | ||
@@ -65,2 +65,3 @@ objectState.data = null | ||
} else if(oldObj && oldObj.to) { | ||
if(options.idFromIndex) console.log("INDEX ELEMENT DELETED", oldObj) | ||
let objectState = objectStates.get(oldObj.to) | ||
@@ -72,4 +73,5 @@ if(objectState) { | ||
objectStates.delete(oldObj.to) | ||
output.change(null, objectState.data) | ||
if(!options.idFromIndex) output.change(null, objectMapper(objectState.data, oldObj)) | ||
} | ||
if(options.idFromIndex) output.change(null, objectMapper(objectState.data, oldObj)) | ||
} | ||
@@ -76,0 +78,0 @@ } |
{ | ||
"name": "@live-change/framework", | ||
"version": "0.3.21", | ||
"version": "0.3.22", | ||
"description": "Live Change Framework - ultimate solution for real time mobile/web apps", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
125234
3463