@fluid-topics/ft-button 2.2.20 → 2.2.24

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.
@@ -178,7 +178,7 @@ FtButton.styles = [
178
178
  FtButton.labelsObserver = new IntersectionObserver((labels) => {
179
179
  for (const label of labels) {
180
180
  const root = label.target.getRootNode();
181
- if (root.host) {
181
+ if (root instanceof ShadowRoot && !!root.host) {
182
182
  root.host.hasTextContent = label.boundingClientRect.width > 0;
183
183
  }
184
184
  else {