use-broadcast-ts
Advanced tools
Comparing version 1.4.0 to 1.4.1
@@ -149,2 +149,10 @@ 'use strict'; | ||
/** | ||
* If BroadcastChannel is not supported, return the basic store | ||
*/ | ||
if (typeof BroadcastChannel === 'undefined') { | ||
console.warn('BroadcastChannel is not supported in this browser. The store will not be shared.'); | ||
return f(set, get, store); | ||
} | ||
/** | ||
* Types | ||
@@ -151,0 +159,0 @@ */ |
{ | ||
"name": "use-broadcast-ts", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "Use the Broadcast Channel API in React easily with hooks or Zustand, and Typescript!", | ||
@@ -89,8 +89,6 @@ "type": "module", | ||
"homepage": "https://github.com/Romainlg29/use-broadcast", | ||
"peerDependencies": { | ||
"optionalDependencies": { | ||
"zustand": "^4.0.0", | ||
"react": ">=18.0" | ||
}, | ||
"optionalDependencies": { | ||
"zustand": "^4.0.0" | ||
} | ||
} |
@@ -48,2 +48,10 @@ import { StateCreator, StoreMutatorIdentifier } from 'zustand'; | ||
/** | ||
* If BroadcastChannel is not supported, return the basic store | ||
*/ | ||
if (typeof BroadcastChannel === 'undefined') { | ||
console.warn('BroadcastChannel is not supported in this browser. The store will not be shared.'); | ||
return f(set, get, store); | ||
} | ||
/** | ||
* Types | ||
@@ -50,0 +58,0 @@ */ |
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
35452
1032