1
0
forked from noxious/server

Width / height bug fix

This commit is contained in:
Dennis Postma 2025-02-05 02:27:27 +01:00
parent 90559e8388
commit a5d8cf5ef9

View File

@ -64,12 +64,12 @@ export default class InitCommand extends BaseCommand {
.setFrameWidth(
(await sharp(Storage.getPublicPath('map_objects', mapObject))
.metadata()
.then((metadata) => metadata.height)) ?? 0
.then((metadata) => metadata.width)) ?? 0
)
.setFrameHeight(
(await sharp(Storage.getPublicPath('map_objects', mapObject))
.metadata()
.then((metadata) => metadata.width)) ?? 0
.then((metadata) => metadata.height)) ?? 0
)
await newMapObject.save()