Closed dhlavaty closed 7 years ago
You might have the same problem as i did https://github.com/gpbl/denormalizr/issues/24
go to the denormalizr source and go to lib/index.js and change line 172 to 178 with this:
if (schema instanceof _EntitySchema2.default || typeof obj === "number" || typeof obj === "string") {
return denormalizeEntity(obj, entities, schema, bag);
} else if (schema instanceof _IterableSchema2.default || Array.isArray(obj)) {
return denormalizeIterable(obj, entities, schema, bag);
} else if (schema instanceof _UnionSchema2.default) {
return denormalizeUnion(obj, entities, schema, bag);
}
its not an elegant fix, but ive found its made the library work for me
This should be solved in the latest version. Please upgrade normalizr and denormalizr thanks!
I'm trying to
normalize
anddenormalize
a simple object structure, but I'm really stuck. I think that I do everything according documentation, but without any luck.You can try my example here: https://jsbin.com/heyayodagi/5/edit?js,console
Code:
But denormalized output looks like this:
Am I doing something wrong, or there is an issue in this library?