mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-04 14:34:37 +08:00
fix: compatibility check for funboxes when switching test modes (@fehmer) (#6471)
This commit is contained in:
parent
ff10baca5e
commit
74d54ac06c
1 changed files with 13 additions and 13 deletions
|
|
@ -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")
|
||||
);
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue