From dcfac434e2a150d38a46e53ebc8f0d738a9aebb4 Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Sat, 19 Feb 2022 02:50:54 +0100 Subject: [PATCH] Fix filter --- Models/ThemeConfig/Conversion/FixImages.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Models/ThemeConfig/Conversion/FixImages.ts b/Models/ThemeConfig/Conversion/FixImages.ts index 08318b4bc..9558e2f6e 100644 --- a/Models/ThemeConfig/Conversion/FixImages.ts +++ b/Models/ThemeConfig/Conversion/FixImages.ts @@ -9,7 +9,7 @@ export class ExtractImages extends Conversion { private _sharedTagRenderings: Map; private static readonly layoutMetaPaths = (metapaths["default"] ?? metapaths).filter(mp => mp.typeHint !== undefined && (mp.typeHint === "image" || mp.typeHint === "icon")) - private static readonly tagRenderingMetaPaths = (tagrenderingmetapaths["default"] ?? tagrenderingmetapaths).filter(trpath => trpath.typeHint !== "rendered") + private static readonly tagRenderingMetaPaths = (tagrenderingmetapaths["default"] ?? tagrenderingmetapaths).filter(trpath => trpath.typeHint === "rendered") constructor(isOfficial: boolean, sharedTagRenderings: Map) { @@ -48,7 +48,7 @@ export class ExtractImages extends Conversion { const fromPath = Utils.CollectPath(trpath.path, foundImage) for (const img of fromPath) { if (typeof img.leaf !== "string") { - (this._isOfficial ? errors: warnings).push(context+": found an image path that is not a path at " + context + "." + img.path.join(".") + ": " + JSON.stringify(img)) + (this._isOfficial ? errors: warnings).push(context+"."+img.path.join(".")+": found an image path that is not a string: " + JSON.stringify(img.leaf)) } } allFoundImages.push(...fromPath.map(i => i.leaf).filter(i => typeof i=== "string"))