@iobroker/js-controller-common 4.0.10-alpha.0-20220215-d0ea36a4 → 4.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/common/tools.js +1 -4
- package/package.json +2 -2
package/lib/common/tools.js
CHANGED
|
@@ -2835,7 +2835,7 @@ function validateGeneralObjectProperties(obj, extend) {
|
|
|
2835
2835
|
|
|
2836
2836
|
// common.states needs to be a real object or an array
|
|
2837
2837
|
if (
|
|
2838
|
-
obj.common.states !== null &&
|
|
2838
|
+
obj.common.states !== null && // we allow null for deletion TODO: implement https://github.com/ioBroker/ioBroker.js-controller/issues/1735
|
|
2839
2839
|
obj.common.states !== undefined &&
|
|
2840
2840
|
!isObject(obj.common.states) &&
|
|
2841
2841
|
!Array.isArray(obj.common.states)
|
|
@@ -2843,9 +2843,6 @@ function validateGeneralObjectProperties(obj, extend) {
|
|
|
2843
2843
|
throw new Error(
|
|
2844
2844
|
`obj.common.states has an invalid type! Expected "object", received "${typeof obj.common.states}"`
|
|
2845
2845
|
);
|
|
2846
|
-
} else if (obj.common.states === null && !extend) {
|
|
2847
|
-
// extend only allowed on extend
|
|
2848
|
-
throw new Error(`obj.common.states has an invalid type! Expected non-null "object", received "null"`);
|
|
2849
2846
|
}
|
|
2850
2847
|
}
|
|
2851
2848
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iobroker/js-controller-common",
|
|
3
|
-
"version": "4.0.10
|
|
3
|
+
"version": "4.0.10",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=12.0.0"
|
|
6
6
|
},
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"lib/",
|
|
48
48
|
"index.js"
|
|
49
49
|
],
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "d334e640b26f5fec15277f6f55c2b46a46e4ae14"
|
|
51
51
|
}
|