@liveblocks/redux
Advanced tools
Comparing version 0.15.1 to 0.15.2
@@ -7,5 +7,2 @@ import { internals } from '@liveblocks/client'; | ||
} | ||
function missingMapping(mappingType) { | ||
return new Error(`${ERROR_PREFIX} ${mappingType} is missing.`); | ||
} | ||
function mappingShouldBeAnObject(mappingType) { | ||
@@ -58,3 +55,3 @@ return new Error(`${ERROR_PREFIX} ${mappingType} should be an object where the values are boolean.`); | ||
const client = options.client; | ||
const mapping = validateMapping(options.storageMapping, "storageMapping"); | ||
const mapping = validateMapping(options.storageMapping || {}, "storageMapping"); | ||
const presenceMapping = validateMapping(options.presenceMapping || {}, "presenceMapping"); | ||
@@ -265,5 +262,2 @@ if (process.env.NODE_ENV !== "production") { | ||
if (process.env.NODE_ENV !== "production") { | ||
if (mapping == null) { | ||
throw missingMapping(mappingType); | ||
} | ||
if (!isObject(mapping)) { | ||
@@ -270,0 +264,0 @@ throw mappingShouldBeAnObject(mappingType); |
@@ -67,5 +67,2 @@ 'use strict'; | ||
} | ||
function missingMapping(mappingType) { | ||
return new Error(ERROR_PREFIX + " " + mappingType + " is missing."); | ||
} | ||
function mappingShouldBeAnObject(mappingType) { | ||
@@ -103,3 +100,3 @@ return new Error(ERROR_PREFIX + " " + mappingType + " should be an object where the values are boolean."); | ||
var client = options.client; | ||
var mapping = validateMapping(options.storageMapping, "storageMapping"); | ||
var mapping = validateMapping(options.storageMapping || {}, "storageMapping"); | ||
var presenceMapping = validateMapping(options.presenceMapping || {}, "presenceMapping"); | ||
@@ -363,6 +360,2 @@ | ||
if (process.env.NODE_ENV !== "production") { | ||
if (mapping == null) { | ||
throw missingMapping(mappingType); | ||
} | ||
if (!isObject(mapping)) { | ||
@@ -369,0 +362,0 @@ throw mappingShouldBeAnObject(mappingType); |
{ | ||
"name": "@liveblocks/redux", | ||
"version": "0.15.1", | ||
"version": "0.15.2", | ||
"sideEffects": false, | ||
@@ -39,3 +39,3 @@ "description": "", | ||
"peerDependencies": { | ||
"@liveblocks/client": "0.15.1", | ||
"@liveblocks/client": "0.15.2", | ||
"redux": "^4" | ||
@@ -64,2 +64,2 @@ }, | ||
} | ||
} | ||
} |
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
Unpublished package
Supply chain riskPackage version was not found on the registry. It may exist on a different registry and need to be configured to pull from that registry.
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
Unpopular package
QualityThis package is not very popular.
Found 1 instance in 1 package
0
35251
919
1