@oscarpalmer/oui 0.23.0 → 0.23.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.
@@ -51,8 +51,8 @@ function activate(event, focus) {
51
51
  function closeTooltip(instance) {
52
52
  if (instance == null) return;
53
53
  if (instance.timer != null) clearTimeout(instance.timer);
54
- instance.content.hidePopover();
55
- instance.content.removeAttribute(ATTRIBUTE_CONTENT_ACTIVE);
54
+ instance.content?.hidePopover();
55
+ instance.content?.removeAttribute(ATTRIBUTE_CONTENT_ACTIVE);
56
56
  }
57
57
  function createTooltip(anchor) {
58
58
  const content = getContent(anchor);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oscarpalmer/oui",
3
- "version": "0.23.0",
3
+ "version": "0.23.1",
4
4
  "description": "Styles, components, and utilities for building websites and applications.",
5
5
  "keywords": [
6
6
  "css",
package/src/js/tooltip.ts CHANGED
@@ -83,8 +83,8 @@ function closeTooltip(instance?: Tooltip): void {
83
83
  clearTimeout(instance.timer);
84
84
  }
85
85
 
86
- instance.content.hidePopover();
87
- instance.content.removeAttribute(ATTRIBUTE_CONTENT_ACTIVE);
86
+ instance.content?.hidePopover();
87
+ instance.content?.removeAttribute(ATTRIBUTE_CONTENT_ACTIVE);
88
88
  }
89
89
 
90
90
  function createTooltip(anchor: HTMLElement): void {