-
-
Notifications
You must be signed in to change notification settings - Fork 834
bug: reflected prop value forced to null when set to undefined #3586
Copy link
Copy link
Closed
Labels
Bug: ValidatedThis PR or Issue is verified to be a bug within StencilThis PR or Issue is verified to be a bug within Stencil
Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Stencil Version
2.17.4
Current Behavior
Setting the value of a reflected property to undefined will cause Stencil to force the value to null instead.
Expected Behavior
I expect the value to be set to undefined.
Steps to Reproduce
- Clone repo.
- Run
npm install. - Run
npm run start. - Open dev tools. Observe that the
fillproperty is logged as "outline". - Click the "Set fill to undefined" button. Observe that the property is logged as
undefinedand then logged again asnull. - Remove
reflect: truefrom the property decorator. - Click the "Set fill to undefined" button. Observe that the property is only logged as
undefined.
Code Reproduction URL
https://github.com/liamdebeasi/stencil-reflect-prop
Additional Information
This was found in ionic-team/ionic-framework#25886.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Bug: ValidatedThis PR or Issue is verified to be a bug within StencilThis PR or Issue is verified to be a bug within Stencil