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
Error on toJSON dump when a computed property returns undefined #40
Fluxo v0.0.23 is breaking when a computed property returns undefined.
The following code reproduces the error:
js
class Person extends Fluxo.ObjectStore {
static computed = { something: ["change"] };
something () {
return undefined;
}
}
x = new Person
x.toJSON()
The error message is: Uncaught SyntaxError: Unexpected token u in JSON at position 0
Fluxo
v0.0.23
is breaking when a computed property returnsundefined
.The following code reproduces the error:
The error message is:
Uncaught SyntaxError: Unexpected token u in JSON at position 0
The error occurs on this line: https://github.com/fluxo-js/fluxo/blob/master/dist/fluxo.js#L572
Let me known if I can help. Thanks!