Fix map grid detection
This commit is contained in:
parent
7583817f6a
commit
b2b6f281a9
@ -127,7 +127,7 @@ function SelectMapModal({
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
image.onload = async function () {
|
image.onload = async function () {
|
||||||
// Find name and grid size
|
// Find name and grid size
|
||||||
let gridSize = { x: 22, y: 22 };
|
let gridSize;
|
||||||
let name = "Unknown Map";
|
let name = "Unknown Map";
|
||||||
if (file.name) {
|
if (file.name) {
|
||||||
if (file.name.matchAll) {
|
if (file.name.matchAll) {
|
||||||
@ -162,6 +162,10 @@ function SelectMapModal({
|
|||||||
name = Case.capital(name);
|
name = Case.capital(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!gridSize) {
|
||||||
|
gridSize = { x: 22, y: 22 };
|
||||||
|
}
|
||||||
|
|
||||||
// Create resolutions
|
// Create resolutions
|
||||||
const resolutions = {};
|
const resolutions = {};
|
||||||
for (let resolution of mapResolutions) {
|
for (let resolution of mapResolutions) {
|
||||||
|
Loading…
Reference in New Issue
Block a user