From 78311b8986117df42e0e3baa663737c490a60bd7 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Wed, 13 Dec 2023 19:11:17 +0100 Subject: [PATCH] Fix crash on custom themes --- src/Models/ThemeConfig/Conversion/FixImages.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Models/ThemeConfig/Conversion/FixImages.ts b/src/Models/ThemeConfig/Conversion/FixImages.ts index 6183bbafb4..37f6999723 100644 --- a/src/Models/ThemeConfig/Conversion/FixImages.ts +++ b/src/Models/ThemeConfig/Conversion/FixImages.ts @@ -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,