broadcast-channel
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -44,4 +44,9 @@ var isNode = require('detect-node'); | ||
export function canBeUsed() { | ||
if (isNode) return false; | ||
/** | ||
* in the electron-renderer, isNode will be true even if we are in browser-context | ||
* so we also check if window is undefined | ||
*/ | ||
if (isNode && typeof window === 'undefined') return false; | ||
if (typeof BroadcastChannel === 'function') { | ||
@@ -48,0 +53,0 @@ if (BroadcastChannel._pubkey) { |
@@ -57,4 +57,9 @@ 'use strict'; | ||
function canBeUsed() { | ||
if (isNode) return false; | ||
/** | ||
* in the electron-renderer, isNode will be true even if we are in browser-context | ||
* so we also check if window is undefined | ||
*/ | ||
if (isNode && typeof window === 'undefined') return false; | ||
if (typeof BroadcastChannel === 'function') { | ||
@@ -61,0 +66,0 @@ if (BroadcastChannel._pubkey) { |
{ | ||
"name": "broadcast-channel", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "A BroadcastChannel implementation that works with new browsers, older browsers and Node.js", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/pubkey/broadcast-channel#readme", |
@@ -47,4 +47,9 @@ const isNode = require('detect-node'); | ||
export function canBeUsed() { | ||
if (isNode) return false; | ||
/** | ||
* in the electron-renderer, isNode will be true even if we are in browser-context | ||
* so we also check if window is undefined | ||
*/ | ||
if (isNode && typeof window === 'undefined') return false; | ||
if (typeof BroadcastChannel === 'function') { | ||
@@ -51,0 +56,0 @@ if (BroadcastChannel._pubkey) { |
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
207807
5079