Skip to content

Commit

Permalink
Eval guard value as double not (#468)
Browse files Browse the repository at this point in the history
* Eval guard value as double not

* Fix regression bug that always set response primitives required to false
  • Loading branch information
sserrata committed Mar 1, 2023
1 parent 98ee52e commit 980e6c3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ function createEdges({
return create("SchemaItem", {
collapsible: false,
name,
required: false,
required: Array.isArray(required) ? required.includes(name) : required,
schemaName: schemaName,
qualifierMessage: getQualifierMessage(schema),
schema: mergedSchemas,
Expand Down Expand Up @@ -760,7 +760,7 @@ function createEdges({
return create("SchemaItem", {
collapsible: false,
name,
required: false,
required: Array.isArray(required) ? required.includes(name) : required,
schemaName: schemaName,
qualifierMessage: getQualifierMessage(schema),
schema: schema,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function guard<T>(
value: T | undefined,
cb: (value: T) => Children
): string {
if (value) {
if (!!value) {
const children = cb(value);
return render(children);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function guard<T>(
value: T | undefined | string,
cb: (value: T) => Children
): string {
if (value !== undefined) {
if (!!value) {
const children = cb(value as T);
return render(children);
}
Expand Down

0 comments on commit 980e6c3

Please sign in to comment.