WebUI: use native function when converting to numbers

PR #22246.
This commit is contained in:
Chocobo1
2025-02-08 17:58:48 +08:00
committed by GitHub
parent 93925042dd
commit c65a68251e
3 changed files with 6 additions and 6 deletions

View File

@@ -1515,7 +1515,7 @@ window.addEventListener("DOMContentLoaded", () => {
});
let prop_h = LocalPreferences.get("properties_height_rel");
if (prop_h !== null)
prop_h = prop_h.toFloat() * Window.getSize().y;
prop_h = Number(prop_h) * Window.getSize().y;
else
prop_h = Window.getSize().y / 2.0;
new MochaUI.Panel({