diff --git a/src/metadata-storage.js b/src/metadata-storage.js index aa61ce5b..7c4d7d1a 100644 --- a/src/metadata-storage.js +++ b/src/metadata-storage.js @@ -17,8 +17,12 @@ class MetadataStorage { this.secure = secure; this.sameSite = sameSite; this.expirationDays = expirationDays; - const writableTopDomain = topDomain(getLocation().href); - this.cookieDomain = domain || (writableTopDomain ? '.' + writableTopDomain : null); + this.cookieDomain =''; + + if (!BUILD_COMPAT_REACT_NATIVE) { + const writableTopDomain = topDomain(getLocation().href); + this.cookieDomain = domain || (writableTopDomain ? '.' + writableTopDomain : null); + } } getCookieStorageKey() {