arqex / freezer

A tree data structure that emits events on updates, even if the modification is triggered by one of the leaves, making it easier to think in a reactive way.
MIT License
1.28k stars 56 forks source link

data.set( hash ) empties hash #24

Closed kuraga closed 9 years ago

kuraga commented 9 years ago

Is it normal?

var store = new Freezer({ time: 0 });
var data = store.get();

var changes = { time: 1 };
data.set(changes);
console.log(changes); // {}
// changes is empty object now!
arqex commented 9 years ago

Nice catch!

I will have a look at it.

arqex commented 9 years ago

Hi @kuraga This has been fixed in v0.5.2 thanks for your help!