fixed issue breaking node v4 compatibility

This commit is contained in:
Sebastian Hildebrandt
2020-08-26 20:00:25 +02:00
parent 0a334fda63
commit b26602f09a
5 changed files with 49 additions and 43 deletions
+2 -2
View File
@@ -355,10 +355,10 @@ function observe(valueObject, interval, callback) {
const result = setInterval(() => {
get(valueObject).then(data => {
if (JSON.stringify(_data) !== JSON.stringify(data)) {
_data = { ...data };
_data = Object.assign({}, data );
callback(data);
}
})
});
}, interval);
return result;
}