diff --git a/frontend/src/ts/test/funbox/funbox-functions.ts b/frontend/src/ts/test/funbox/funbox-functions.ts index 7430c0b6bae6..8e1f47c2307f 100644 --- a/frontend/src/ts/test/funbox/funbox-functions.ts +++ b/frontend/src/ts/test/funbox/funbox-functions.ts @@ -348,7 +348,9 @@ const list: Partial> = { }, backwards: { alterText(word: string): string { - return word.split("").reverse().join(""); + // @ts-expect-error - v flag is only supported in es2024+, need to consider alternatives + const regex = /\p{RGI_Emoji}|\p{Any}/gv; + return (word.match(regex) ?? []).reverse().join(""); }, }, capitals: {