Skip to content

Commit

Permalink
fix(nx-dev): test additional property for boolean and object
Browse files Browse the repository at this point in the history
It fixes the wrong test condition when attempting to look for additional
properties for parameter type. It now explicitly looks for a boolean or
and object.

closes #12773
  • Loading branch information
bcabanes committed Jan 26, 2023
1 parent 0650ee9 commit 063abad
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nx-dev/feature-package-schema-viewer/src/lib/types/type.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ function hasPatternProperties(s: JsonSchema1): boolean {
}

function hasAdditionalProperties(s: JsonSchema1): boolean {
return !(
typeof s.additionalProperties === 'boolean' && !s.additionalProperties
return (
typeof s.additionalProperties === 'boolean' ||
typeof s.additionalProperties === 'object'
);
}

Expand Down

0 comments on commit 063abad

Please sign in to comment.