From 74a11eaecc284997860e10fd040b34765fa65657 Mon Sep 17 00:00:00 2001 From: SillyLossy Date: Mon, 1 May 2023 21:26:51 +0300 Subject: [PATCH] Fix deletion of world info file on empty rename --- public/scripts/world-info.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/scripts/world-info.js b/public/scripts/world-info.js index 3fb0c6b22..61c455cec 100644 --- a/public/scripts/world-info.js +++ b/public/scripts/world-info.js @@ -371,9 +371,9 @@ async function saveWorldInfo(immediately) { async function renameWorldInfo() { const oldName = world_info; - const newName = $("#world_popup_name").val(); + const newName = $("#world_popup_name").val().trim(); - if (oldName === newName) { + if (oldName === newName || !newName) { return; }