Skip to content

Commit

Permalink
fix: filter out properly null objects in oneOf and anyOf (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
derberg authored Dec 23, 2020
1 parent 84af588 commit a133fbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion filters/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
});
Expand Down

0 comments on commit a133fbe

Please sign in to comment.