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