fix: compatibility check for funboxes when switching test modes (@fehmer) (#6471)

This commit is contained in:
Christian Fehmer 2025-04-19 17:02:53 +02:00 committed by GitHub
parent ff10baca5e
commit 74d54ac06c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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")
);
})