diff --git a/src/components/profile-selector/MyAccountMenu.tsx b/src/components/profile-selector/MyAccountMenu.tsx index fcb3984e5..c42ac0ecd 100644 --- a/src/components/profile-selector/MyAccountMenu.tsx +++ b/src/components/profile-selector/MyAccountMenu.tsx @@ -67,7 +67,12 @@ const MyAccountDrawerContext = createContext(initV export const useMyAccountDrawer = () => useContext(MyAccountDrawerContext) function parseMessage(data: string) { - const [origin, name, value] = data.split(':') + const match = data.match(/^([^:]+):([^:]+):(.+)$/) + if (!match) return null + + const origin = match[1] + const name = match[2] + const value = match[3] if (origin !== 'grill') return null return { name: name ?? '', value: value ?? '' } }