@smilodon/core 1.1.2 → 1.1.4

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.umd.js CHANGED
@@ -2581,7 +2581,8 @@
2581
2581
  // Check if styles already exist for this component type
2582
2582
  const existingStyle = document.head.querySelector('style[data-component="angular-enhanced-select-shared"]');
2583
2583
  if (existingStyle) {
2584
- // Styles already injected, skip
2584
+ // Styles already injected, reuse the existing one
2585
+ this._styleElement = existingStyle;
2585
2586
  return;
2586
2587
  }
2587
2588
  // Create scoped styles for this component type (shared across all instances)
@@ -2902,8 +2903,8 @@
2902
2903
  min-height: 44px;
2903
2904
  }
2904
2905
  `;
2905
- // Safely append to document head (check if document is ready)
2906
- if (document.head) {
2906
+ // Safely append to document head (check if document is ready and not already appended)
2907
+ if (document.head && !this._styleElement.parentNode) {
2907
2908
  try {
2908
2909
  document.head.appendChild(this._styleElement);
2909
2910
  }