schema-markdown 1.2.2 → 1.2.3
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/schema.js +2 -2
- package/package.json +1 -1
package/lib/schema.js
CHANGED
|
@@ -256,7 +256,7 @@ function validateTypeHelper(types, type, value, memberFqn) {
|
|
|
256
256
|
const dictKeyAttr = 'keyAttr' in dict ? dict.keyAttr : null;
|
|
257
257
|
if (value === '') {
|
|
258
258
|
valueNew = {};
|
|
259
|
-
} else if (typeof value !== 'object') {
|
|
259
|
+
} else if (value === null || typeof value !== 'object') {
|
|
260
260
|
throwMemberError(type, value, memberFqn);
|
|
261
261
|
}
|
|
262
262
|
|
|
@@ -333,7 +333,7 @@ function validateTypeHelper(types, type, value, memberFqn) {
|
|
|
333
333
|
// Valid value type?
|
|
334
334
|
if (value === '') {
|
|
335
335
|
valueNew = {};
|
|
336
|
-
} else if (typeof value !== 'object') {
|
|
336
|
+
} else if (value === null || typeof value !== 'object') {
|
|
337
337
|
throwMemberError({'user': struct.name}, value, memberFqn);
|
|
338
338
|
}
|
|
339
339
|
|