use-broadcast-ts
Advanced tools
Comparing version 1.4.4 to 1.4.5
@@ -148,2 +148,7 @@ 'use strict'; | ||
var _options$name; | ||
if (typeof window === 'undefined') { | ||
console.warn('BroadcastChannel is not supported in this environment. The store will not be shared.'); | ||
return f(set, get, store); | ||
} | ||
/** | ||
@@ -150,0 +155,0 @@ * If BroadcastChannel is not supported, return the basic store |
{ | ||
"name": "use-broadcast-ts", | ||
"version": "1.4.4", | ||
"version": "1.4.5", | ||
"description": "Use the Broadcast Channel API in React easily with hooks or Zustand, and Typescript!", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -69,2 +69,4 @@ # use-broadcast-ts | ||
_**Note:** It cannot be used in server components as it needs an environment that support the Broadcast Channel API_ | ||
#### New in v1.4.0 | ||
@@ -71,0 +73,0 @@ |
@@ -47,2 +47,7 @@ import { StateCreator, StoreMutatorIdentifier } from 'zustand'; | ||
const sharedImpl: SharedImpl = (f, options) => (set, get, store) => { | ||
if (typeof window === 'undefined') { | ||
console.warn('BroadcastChannel is not supported in this environment. The store will not be shared.'); | ||
return f(set, get, store); | ||
} | ||
/** | ||
@@ -49,0 +54,0 @@ * If BroadcastChannel is not supported, return the basic store |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
238
42125
15
1307