@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.cjs CHANGED
@@ -2577,7 +2577,8 @@ class AngularEnhancedSelect extends HTMLElement {
2577
2577
  // Check if styles already exist for this component type
2578
2578
  const existingStyle = document.head.querySelector('style[data-component="angular-enhanced-select-shared"]');
2579
2579
  if (existingStyle) {
2580
- // Styles already injected, skip
2580
+ // Styles already injected, reuse the existing one
2581
+ this._styleElement = existingStyle;
2581
2582
  return;
2582
2583
  }
2583
2584
  // Create scoped styles for this component type (shared across all instances)
@@ -2898,8 +2899,8 @@ class AngularEnhancedSelect extends HTMLElement {
2898
2899
  min-height: 44px;
2899
2900
  }
2900
2901
  `;
2901
- // Safely append to document head (check if document is ready)
2902
- if (document.head) {
2902
+ // Safely append to document head (check if document is ready and not already appended)
2903
+ if (document.head && !this._styleElement.parentNode) {
2903
2904
  try {
2904
2905
  document.head.appendChild(this._styleElement);
2905
2906
  }