pl-api: need some eep enough for today

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2026-02-27 02:28:59 +01:00
parent 00dddbece6
commit f78393d92b

View File

@ -50,7 +50,11 @@ const baseStatusSchema = v.object({
account: v.pipe(
v.unknown(),
v.transform((account) => {
if ((window as any)?.__PL_API_FALLBACK_ACCOUNT && JSON.stringify(account) === '{}')
if (
typeof window !== 'undefined' &&
(window as any).__PL_API_FALLBACK_ACCOUNT &&
JSON.stringify(account) === '{}'
)
return (window as any).__PL_API_FALLBACK_ACCOUNT;
return account;
}),