Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When setting a prop to null a warning is firing: Cannot read property 'type' of null #103

Closed
Tzelon opened this issue Jul 13, 2020 · 1 comment
Labels
bug Something isn't working as expected

Comments

@Tzelon
Copy link

Tzelon commented Jul 13, 2020

Describe the bug
When setting a prop to null a warning is firing:
Cannot read property 'type' of null

To Reproduce

  1. Click the yellow box and watch the console.
  2. Drag the yellow box and you will see this warning fires multiple times.
    https://codesandbox.io/s/craftjs-cannot-read-property-type-of-null-czjmm?file=/src/App.tsx

Expected behavior
No warning. props can be null.

Your environment

Software Version(s)
craft.js 0.1.0-beta.8
React 16.12.0
@prevwong prevwong added the bug Something isn't working as expected label Jul 15, 2020
@prevwong
Copy link
Owner

Hey @Tzelon 👋 Thanks for the sandbox demo, it was really helpful! The issue seems to have been the serialising function, the fix is now in 0.1.0-beta.9!

dadwic pushed a commit to dadwic/craft.js that referenced this issue Jul 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

2 participants