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")
} else if (typeof img.leaf !== "string") {
const c = context.enter(img.path)
const w = this._isOfficial ? c.err : c.warn
w(
"found an image path that is not a string: " +
JSON.stringify(img.leaf)
)
const msg = "found an image path that is not a string: " +
JSON.stringify(img.leaf)
if(this._isOfficial) {
c.err(msg)
}else {
c.warn(msg)
}
} else {
allFoundImages.push({
path: img.leaf,