Fix map grid detection
This commit is contained in:
parent
7583817f6a
commit
b2b6f281a9
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user