Skip to content

Commit 92829d1

Browse files
author
Krishna Rajendran
authored
Fix react native window/cookie error (#256)
1 parent e09fbcd commit 92829d1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/metadata-storage.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@ class MetadataStorage {
1717
this.secure = secure;
1818
this.sameSite = sameSite;
1919
this.expirationDays = expirationDays;
20-
const writableTopDomain = topDomain(getLocation().href);
21-
this.cookieDomain = domain || (writableTopDomain ? '.' + writableTopDomain : null);
20+
this.cookieDomain ='';
21+
22+
if (!BUILD_COMPAT_REACT_NATIVE) {
23+
const writableTopDomain = topDomain(getLocation().href);
24+
this.cookieDomain = domain || (writableTopDomain ? '.' + writableTopDomain : null);
25+
}
2226
}
2327

2428
getCookieStorageKey() {

0 commit comments

Comments
 (0)