Skip to content

Commit f3f84fd

Browse files
authored
fix: Unset _resizeBeforeDraw before _resize() call to avoid possible recursion (#11851)
* fix: Unset _resizeBeforeDraw before _resize to avoid possible recursion * chore: Comment update * chore: Reverted dependency change in package json
1 parent 147ee59 commit f3f84fd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/core/core.controller.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -717,8 +717,9 @@ class Chart {
717717
let i;
718718
if (this._resizeBeforeDraw) {
719719
const {width, height} = this._resizeBeforeDraw;
720-
this._resize(width, height);
720+
// Unset pending resize request now to avoid possible recursion within _resize
721721
this._resizeBeforeDraw = null;
722+
this._resize(width, height);
722723
}
723724
this.clear();
724725

0 commit comments

Comments
 (0)