Fix crash on custom themes

This commit is contained in:
Pieter Vander Vennet 2023-12-13 19:11:17 +01:00
parent 389cd7ddc0
commit 78311b8986

View file

@ -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,