diff --git a/src/modals/SelectMapModal.js b/src/modals/SelectMapModal.js index 6e988ac..2236bc5 100644 --- a/src/modals/SelectMapModal.js +++ b/src/modals/SelectMapModal.js @@ -127,7 +127,7 @@ function SelectMapModal({ return new Promise((resolve, reject) => { image.onload = async function () { // Find name and grid size - let gridSize = { x: 22, y: 22 }; + let gridSize; let name = "Unknown Map"; if (file.name) { if (file.name.matchAll) { @@ -162,6 +162,10 @@ function SelectMapModal({ name = Case.capital(name); } + if (!gridSize) { + gridSize = { x: 22, y: 22 }; + } + // Create resolutions const resolutions = {}; for (let resolution of mapResolutions) {