Skip to content

Commit

Permalink
fix: fix window
Browse files Browse the repository at this point in the history
  • Loading branch information
daybrush committed Dec 26, 2022
1 parent 8cb9d26 commit 5748eb0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/conveyer/src/Conveyer.ts
Expand Up @@ -455,7 +455,10 @@ class Conveyer extends Component<ConveyerEvents> {
this._axes?.destroy();
this.unsubscribe();
this._scrollAreaElement?.removeEventListener("scroll", this._onScroll);
window.removeEventListener("resize", this.update);

if (typeof window !== "undefined") {
window.removeEventListener("resize", this.update);
}
this.off();
this._axes = null;
}
Expand Down

0 comments on commit 5748eb0

Please sign in to comment.