From 08afa8df449532afc2a1a3a57b7d64023c113f71 Mon Sep 17 00:00:00 2001 From: Dimitris - Rafail Katsampas Date: Mon, 5 Aug 2024 20:26:02 +0300 Subject: [PATCH 1/3] fix: Unset _resizeBeforeDraw before _resize to avoid possible recursion --- package.json | 2 +- src/core/core.controller.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b9d5459dfde..91fea1e9c72 100644 --- a/package.json +++ b/package.json @@ -116,7 +116,7 @@ "rollup": "^3.3.0", "rollup-plugin-cleanup": "^3.2.1", "rollup-plugin-istanbul": "^4.0.0", - "rollup-plugin-swc3": "^0.7.0", + "rollup-plugin-swc3": "^0.11.0", "rollup-plugin-terser": "^7.0.2", "typescript": "^4.7.4", "yargs": "^17.5.1" diff --git a/src/core/core.controller.js b/src/core/core.controller.js index 3c643e8ba3f..635198db3a8 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 draw now to avoid possible recursion within _resize this._resizeBeforeDraw = null; + this._resize(width, height); } this.clear(); From db3e877577f37c11870ea26b89719725f58603ae Mon Sep 17 00:00:00 2001 From: Dimitris - Rafail Katsampas Date: Mon, 5 Aug 2024 20:34:49 +0300 Subject: [PATCH 2/3] chore: Comment update --- src/core/core.controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/core.controller.js b/src/core/core.controller.js index 635198db3a8..47b238da8aa 100644 --- a/src/core/core.controller.js +++ b/src/core/core.controller.js @@ -717,7 +717,7 @@ class Chart { let i; if (this._resizeBeforeDraw) { const {width, height} = this._resizeBeforeDraw; - // Unset pending draw now to avoid possible recursion within _resize + // Unset pending resize request now to avoid possible recursion within _resize this._resizeBeforeDraw = null; this._resize(width, height); } From 245bca923143e034040d8a2abc544a47a8f86959 Mon Sep 17 00:00:00 2001 From: Dimitris - Rafail Katsampas Date: Mon, 5 Aug 2024 20:39:14 +0300 Subject: [PATCH 3/3] chore: Reverted dependency change in package json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 91fea1e9c72..b9d5459dfde 100644 --- a/package.json +++ b/package.json @@ -116,7 +116,7 @@ "rollup": "^3.3.0", "rollup-plugin-cleanup": "^3.2.1", "rollup-plugin-istanbul": "^4.0.0", - "rollup-plugin-swc3": "^0.11.0", + "rollup-plugin-swc3": "^0.7.0", "rollup-plugin-terser": "^7.0.2", "typescript": "^4.7.4", "yargs": "^17.5.1"