From 6578fd06fd13b480990e4b32da1653cb957aa464 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Tue, 19 Nov 2024 03:12:50 +0800 Subject: [PATCH] WebUI: fix failed conversion to number The value has unit suffix (`px`) and require using `parseInt()` for conversion. Fix up f73f31619ddebafcc82dfd65b9be7eeb347d467a. PR #21862. --- src/webui/www/private/scripts/dynamicTable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webui/www/private/scripts/dynamicTable.js b/src/webui/www/private/scripts/dynamicTable.js index 913909cf4..47f4899c1 100644 --- a/src/webui/www/private/scripts/dynamicTable.js +++ b/src/webui/www/private/scripts/dynamicTable.js @@ -254,7 +254,7 @@ window.qBittorrent.DynamicTable ??= (() => { const onStart = function(el, event) { if (this.canResize) { this.currentHeaderAction = "resize"; - this.startWidth = Number(this.resizeTh.style.width); + this.startWidth = parseInt(this.resizeTh.style.width, 10); } else { this.currentHeaderAction = "drag";