diff --git a/lib/GridLayout.ts b/lib/GridLayout.ts index 6dd41a6..16a6b03 100644 --- a/lib/GridLayout.ts +++ b/lib/GridLayout.ts @@ -103,7 +103,7 @@ export default class GridLayout extends HTMLElement { #timeout?: number; observer = new ResizeObserver(() => { clearTimeout(this.#timeout); - this.#timeout = setTimeout(() => { + this.#timeout = window.setTimeout(() => { this.#timeout = void 0; this.calculateSize(); this.render(); diff --git a/package.json b/package.json index 5414e31..eb6ade6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grid-layout-component", - "version": "0.3.2", + "version": "0.3.3", "description": "A draggable and resizable grid layout with responsive breakpoints.", "main": "dist/grid-layout-component.min.js", "types": "dist/index.d.ts",