From: Dimitris-Rafail Katsampas Date: Thu, 8 Aug 2024 18:08:30 +0000 (+0300) Subject: fix: Unset _resizeBeforeDraw before _resize() call to avoid possible recursion (... X-Git-Tag: v4.4.4~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f3f84fd624e9e7e750c15db0508b573bd09e8563;p=thirdparty%2FChart.js.git 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 --- diff --git a/src/core/core.controller.js b/src/core/core.controller.js index 3c643e8ba..47b238da8 100644 --- a/src/core/core.controller.js +++ b/src/core/core.controller.js @@ -717,8 +717,9 @@ class Chart { let i; if (this._resizeBeforeDraw) { const {width, height} = this._resizeBeforeDraw; - this._resize(width, height); + // Unset pending resize request now to avoid possible recursion within _resize this._resizeBeforeDraw = null; + this._resize(width, height); } this.clear();