fluxo-js / fluxo

Fluxo is a simple, lightweight (~300LOC) and dependency free data infrastructure lib based on Facebook Flux and Backbone.js. It's compatible with React.js, but you can use with whatever you want to the view/component layer.
15 stars 3 forks source link

Fluxo.ObjectStore#reset not working #41

Closed sobrinho closed 8 years ago

sobrinho commented 8 years ago
x = new Fluxo.ObjectStore;
x.reset({name: "John"});

This throws an exception because Fluxo.ObjectStore#getDefaults returns undefined when the store do not have any attribute contract specified.

Since reset tries to manipulate the getDefaults result, expecting an object, the exception occurs.

sobrinho commented 8 years ago

Fixed by 7f02b901ed6f9673a89e0fbfdab141d65fb2d21d