@descope/web-components-ui 3.10.0 → 3.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -29353,8 +29353,6 @@ class RawAnchored extends createBaseClass$1({
29353
29353
  `;
29354
29354
 
29355
29355
  this.defaultSlot = this.shadowRoot.querySelector('slot:not([name])');
29356
-
29357
- this.#syncComponentState();
29358
29356
  }
29359
29357
 
29360
29358
  init() {
@@ -29412,7 +29410,7 @@ class RawAnchored extends createBaseClass$1({
29412
29410
  // To support conditional components in flow, we need to sync the 'hidden' className to the root of the component.
29413
29411
  // Ideally, this would happen in the SDK, but we resolved to this patch to fix the issue without forcing users to update SDKs.
29414
29412
  #syncComponentState() {
29415
- const hasHidden = this.#anchor.classList.contains('hidden');
29413
+ const hasHidden = this.#anchor?.classList?.contains('hidden');
29416
29414
  this.classList.toggle('hidden', hasHidden);
29417
29415
  }
29418
29416
 
@@ -29477,6 +29475,7 @@ class RawAnchored extends createBaseClass$1({
29477
29475
  // empty host rather than reserving its layout box.
29478
29476
  #onAnchorChanged() {
29479
29477
  this.toggleAttribute('has-anchor', !!this.#anchor);
29478
+ this.#syncComponentState();
29480
29479
  }
29481
29480
  }
29482
29481