Skip to content

Commit 765fe5c

Browse files
fix for #24 and omission from last release
1 parent 8941e24 commit 765fe5c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/factory.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,13 @@ export default function plotComponentFactory(Plotly) {
133133
this.props.onPurge(this.el);
134134
}
135135
if (this.fitHandler && isBrowser) {
136-
window.removeEventListener('resize', this.handleResize);
136+
window.removeEventListener('resize', this.fitHandler);
137137
this.fitHandler = null;
138138
}
139+
if (this.resizeHandler && isBrowser) {
140+
window.removeEventListener('resize', this.resizeHandler);
141+
this.resizeHandler = null;
142+
}
139143

140144
this.removeUpdateEvents();
141145

0 commit comments

Comments
 (0)