Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

style object is mutated by a component it's passed to #241

Open
Tomassito opened this issue Jan 6, 2020 · 1 comment
Open

style object is mutated by a component it's passed to #241

Tomassito opened this issue Jan 6, 2020 · 1 comment

Comments

@Tomassito
Copy link

https://github.com/storybookjs/react-treebeard/blob/36d72f10c35655371d0d0e396128709288bc8b4c/src/components/NodeHeader.js#L34
I believe the 'target' argument should be an object literal here, i.e. Object.assign({}, style, {container: {...style.link, ...style.activeLink}})
Also, see no reason why Object.assign is mixed with the spread syntax...

@mnebuerquo
Copy link

Also, this throws an exception for me:

Uncaught TypeError: can't define property "container": Object is not extensible

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants