react-treebeard icon indicating copy to clipboard operation
react-treebeard copied to clipboard

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

Open Tomassito opened this issue 6 years ago • 1 comments

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...

Tomassito avatar Jan 06 '20 22:01 Tomassito

Also, this throws an exception for me:

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

mnebuerquo avatar Dec 13 '21 12:12 mnebuerquo