@allbin/entity-logic
Advanced tools
Comparing version 0.6.3 to 0.6.4
@@ -58,9 +58,9 @@ "use strict"; | ||
if (!prop.key || !/^meta\.|^inventory\.|^derived\./.test(prop.key)) { | ||
throw new Error("Schema prop has no/invalid key"); | ||
throw new Error("Schema prop has invalid key: " + prop.key); | ||
} | ||
if (!prop.type) { | ||
throw new Error("Schema prop has no/invalid type"); | ||
throw new Error("Schema prop " + prop.key + " has no/invalid type: " + prop.type); | ||
} | ||
if (!prop.name) { | ||
throw new Error("Schema prop has no/invalid name"); | ||
throw new Error("Schema prop " + prop.key + " has no/invalid name: " + prop.name); | ||
} | ||
@@ -307,3 +307,5 @@ if (![ | ||
var validatePropertiesModifiable = function (schemaPropsByKey, prev_properties, properties) { | ||
Object.keys(properties).forEach(function (p) { | ||
Object.keys(schemaPropsByKey) | ||
.filter(function (p) { return !schemaPropsByKey[p].modifiable; }) | ||
.forEach(function (p) { | ||
var schema_prop = schemaPropsByKey[p]; | ||
@@ -315,3 +317,3 @@ if (!schema_prop) { | ||
var prop_val = properties[p]; | ||
if (!schema_prop.modifiable && prev_val !== prop_val) { | ||
if (prev_val !== prop_val) { | ||
throw new Error("Properties include modification to readonly property " + p); | ||
@@ -318,0 +320,0 @@ } |
{ | ||
"name": "@allbin/entity-logic", | ||
"version": "0.6.3", | ||
"version": "0.6.4", | ||
"description": "Logic solver for mobilix filters", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
82720
2229