-
-
Notifications
You must be signed in to change notification settings - Fork 832
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
4.43.0
Current Behavior
When setting an optional mutable property to undefined initially, the host value is never updated.
Expected Behavior
Host value is always in sync with prop value.
System Info
Steps to Reproduce
-
Define mutable optional prop
@Prop({ mutable: true }) first?: string; -
Set prop to undefined initially
const myComponent = document.querySelector("my-component");
myComponent.first = undefined;
-
Update value of prop internally
this.first = 'Some value'; -
Host value was not updated to new value
this.host.first=> stillundefined
Code Reproduction URL
https://codesandbox.io/p/github/johnjenkins/stencil-starter/csb-z96sgg/draft/damp-sound
Additional Information
Seems to work in 4.37.1 and breaks starting from version 🎿 4.38.0 (2025-10-02)
Problem seems to also exist when the prop is not mutable and the value is set from outside but the other way around. The internal prop is not updated in that case.
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