styled-components / babel-plugin-styled-components

Improve the debugging experience and add server-side rendering support to styled-components

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: Cannot read property 'reduce' of undefined

milad-afkhami opened this issue · comments

When i try to use this syntac css={{ ...css, ...(playing ? { opacity: 0, bottom: "-100px" } : {}) }}, it fails and it says TypeError: Cannot read property 'reduce' of undefined
here is my code:

Screen Shot 2021-07-03 at 9 13 13 PM

Screen Shot 2021-07-03 at 9 17 57 PM

Screen Shot 2021-07-03 at 9 18 34 PM

Screen Shot 2021-07-03 at 9 18 44 PM

sorry i don't have time to prepare a workaround
if it's not possible for you to debug in this way i can do something about that.

Thanks for the code sample, will work on a patch!

@miladMAPS could you please try out 1.13.2-test.0 and let me know if it fixes your issue?