Skip to content

Commit b467d49

Browse files
Merge pull request #823 from appwrite/fix-64-prevent-clearing-fallback-header
Prevent clearing fallback header in Web SDK
2 parents 549eeeb + 67ba4cf commit b467d49

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

templates/web/src/client.ts.twig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,10 @@ class Client {
353353
};
354354

355355
if (typeof window !== 'undefined' && window.localStorage) {
356-
headers['X-Fallback-Cookies'] = window.localStorage.getItem('cookieFallback') ?? '';
356+
const cookieFallback = window.localStorage.getItem('cookieFallback');
357+
if (cookieFallback) {
358+
headers['X-Fallback-Cookies'] = cookieFallback;
359+
}
357360
}
358361

359362
if (method === 'GET') {

0 commit comments

Comments
 (0)