forked from noxious/server
Width / height bug fix
This commit is contained in:
parent
90559e8388
commit
a5d8cf5ef9
@ -64,12 +64,12 @@ export default class InitCommand extends BaseCommand {
|
|||||||
.setFrameWidth(
|
.setFrameWidth(
|
||||||
(await sharp(Storage.getPublicPath('map_objects', mapObject))
|
(await sharp(Storage.getPublicPath('map_objects', mapObject))
|
||||||
.metadata()
|
.metadata()
|
||||||
.then((metadata) => metadata.height)) ?? 0
|
.then((metadata) => metadata.width)) ?? 0
|
||||||
)
|
)
|
||||||
.setFrameHeight(
|
.setFrameHeight(
|
||||||
(await sharp(Storage.getPublicPath('map_objects', mapObject))
|
(await sharp(Storage.getPublicPath('map_objects', mapObject))
|
||||||
.metadata()
|
.metadata()
|
||||||
.then((metadata) => metadata.width)) ?? 0
|
.then((metadata) => metadata.height)) ?? 0
|
||||||
)
|
)
|
||||||
|
|
||||||
await newMapObject.save()
|
await newMapObject.save()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user