-
-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Labels
nitro-coreIssue is related to the Nitro Modules core runtime/C++ codebaseIssue is related to the Nitro Modules core runtime/C++ codebase
Description
What happened?
I have a nitro view with an optional prop. If I set that prop to a value, and then back to undefined, I get the error seen below.
Reproduceable Code
Repro can be found here: https://github.com/OrfeasZ/nitro-undefined-issue
Video demonstrating the issue: https://i.nofate.me/Kj7yhtil6Ix2gAW4SKM5fl4X.mp4
Steps I took:
- Create a sample nitro view plugin using
create-nitro-module. - Make the
isRedproperty optional and runnitrogen. - Adjust the relevant Swift code to handle the optional value.
- Adjust
App.tsxto haveisRedset toundefinedinitially. - Add buttons to
App.tsxto changeisRedto have a value and back toundefined. - Run the example app and press on
Set Redfollowed byClear Color.
Relevant log output
Exception in HostFunction: PropTest.isRed: Value is null, expected a booleanDevice
iPhone 16
Nitro Modules Version
0.33.2
Nitrogen Version
0.33.2
Can you reproduce this issue in the Nitro Example app here?
I didn't try (
Additional information
- I am using Expo
- I am using nitrogen
- I have read and followed the Troubleshooting Guide.
- I created a reproduction PR to reproduce this issue here in the nitro repo. (See Contributing for more information)
- I searched for similar issues in this repository and found none.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
nitro-coreIssue is related to the Nitro Modules core runtime/C++ codebaseIssue is related to the Nitro Modules core runtime/C++ codebase