From a133fbe737dbc43c4ef74e47049fba60870c4f4d Mon Sep 17 00:00:00 2001 From: Lukasz Gornicki Date: Wed, 23 Dec 2020 09:14:58 +0100 Subject: [PATCH] fix: filter out properly null objects in oneOf and anyOf (#109) --- filters/all.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filters/all.js b/filters/all.js index 357ac7b6d..6c6f071d7 100644 --- a/filters/all.js +++ b/filters/all.js @@ -17,7 +17,7 @@ function defineType(prop, propName) { } else if (prop.anyOf() || prop.oneOf()) { let propType = 'OneOf'; let hasPrimitive = false; - [].concat(prop.anyOf(), prop.oneOf()).filter(obj != null).forEach(obj => { + [].concat(prop.anyOf(), prop.oneOf()).filter(obj => obj != null).forEach(obj => { hasPrimitive |= obj.type() !== 'object'; propType += _.upperFirst(_.camelCase(obj.uid())); });