From 74d54ac06cb44026886835ed5ca5b05ebf8cc8d3 Mon Sep 17 00:00:00 2001 From: Christian Fehmer Date: Sat, 19 Apr 2025 17:02:53 +0200 Subject: [PATCH] fix: compatibility check for funboxes when switching test modes (@fehmer) (#6471) --- .../src/ts/test/funbox/funbox-validation.ts | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/frontend/src/ts/test/funbox/funbox-validation.ts b/frontend/src/ts/test/funbox/funbox-validation.ts index eb0510736..bd0cb8ba7 100644 --- a/frontend/src/ts/test/funbox/funbox-validation.ts +++ b/frontend/src/ts/test/funbox/funbox-validation.ts @@ -87,16 +87,16 @@ export function canSetConfigWithCurrentFunboxes( fb = fb.concat( getFunboxesFromString(funbox).filter((f) => { return ( - f.frontendFunctions?.includes("getWord") ?? - f.frontendFunctions?.includes("pullSection") ?? - f.frontendFunctions?.includes("alterText") ?? - f.frontendFunctions?.includes("withWords") ?? - f.properties?.includes("changesCapitalisation") ?? - f.properties?.includes("nospace") ?? - f.properties?.find((fp) => fp.startsWith("toPush:")) ?? - f.properties?.includes("changesWordsVisibility") ?? - f.properties?.includes("speaks") ?? - f.properties?.includes("changesLayout") ?? + f.frontendFunctions?.includes("getWord") || + f.frontendFunctions?.includes("pullSection") || + f.frontendFunctions?.includes("alterText") || + f.frontendFunctions?.includes("withWords") || + f.properties?.includes("changesCapitalisation") || + f.properties?.includes("nospace") || + f.properties?.some((fp) => fp.startsWith("toPush:")) || + f.properties?.includes("changesWordsVisibility") || + f.properties?.includes("speaks") || + f.properties?.includes("changesLayout") || f.properties?.includes("changesWordsFrequency") ); }) @@ -106,9 +106,9 @@ export function canSetConfigWithCurrentFunboxes( fb = fb.concat( getFunboxesFromString(funbox).filter((f) => { return ( - f.frontendFunctions?.includes("getWord") ?? - f.frontendFunctions?.includes("pullSection") ?? - f.frontendFunctions?.includes("withWords") ?? + f.frontendFunctions?.includes("getWord") || + f.frontendFunctions?.includes("pullSection") || + f.frontendFunctions?.includes("withWords") || f.properties?.includes("changesWordsFrequency") ); })