From c691865d1165c5f6a135073445a30ea737fe45b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kl=C4=81vs=20Pried=C4=ABtis?= Date: Thu, 27 Sep 2018 03:14:34 +0300 Subject: [PATCH] remove unnecessary return --- script.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/script.js b/script.js index 40e6cfe9..50e3a5ed 100644 --- a/script.js +++ b/script.js @@ -3547,7 +3547,7 @@ function fantasyMap() { Cancel: function() {$(this).dialog("close");} } }); - return; + }); $("#burgNameInput").on("input", function() { @@ -6378,7 +6378,7 @@ function fantasyMap() { document.head.removeChild(s); return fetched; }) - .catch(function() {return}); + .catch(function() {}); } // Update font list for Label and Burg Editors @@ -6700,7 +6700,7 @@ function fantasyMap() { loadDataFromMap(data); }}}); } else {loadDataFromMap(data);} - if (mapVersion.length > 10) {console.error("Cannot load map"); return;} + if (mapVersion.length > 10) {console.error("Cannot load map"); } }; fileReader.readAsText(file, "UTF-8"); if (callback) {callback();} @@ -7689,7 +7689,7 @@ function fantasyMap() { let cell = diagram.find(points[i][0],points[i][1]).index; // if closest cell is a small lake, try to find a land neighbor if (cells[cell].lake === 2) cells[cell].neighbors.forEach(function(n) { - if (cells[n].height >= 20) {cell = n; return;} + if (cells[n].height >= 20) {cell = n; } }); let region = cells[cell].region; if (region === undefined) region = -1;