forked from MapComplete/MapComplete
Fix crash on custom themes
This commit is contained in:
parent
389cd7ddc0
commit
78311b8986
1 changed files with 7 additions and 5 deletions
|
@ -147,11 +147,13 @@ export class ExtractImages extends Conversion<
|
||||||
.warn("Found an emtpy image")
|
.warn("Found an emtpy image")
|
||||||
} else if (typeof img.leaf !== "string") {
|
} else if (typeof img.leaf !== "string") {
|
||||||
const c = context.enter(img.path)
|
const c = context.enter(img.path)
|
||||||
const w = this._isOfficial ? c.err : c.warn
|
const msg = "found an image path that is not a string: " +
|
||||||
w(
|
JSON.stringify(img.leaf)
|
||||||
"found an image path that is not a string: " +
|
if(this._isOfficial) {
|
||||||
JSON.stringify(img.leaf)
|
c.err(msg)
|
||||||
)
|
}else {
|
||||||
|
c.warn(msg)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
allFoundImages.push({
|
allFoundImages.push({
|
||||||
path: img.leaf,
|
path: img.leaf,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue