Skip to content

Commit

Permalink
Fix Nested Form Cell Error Display (#629)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Cody Baker <[email protected]>
  • Loading branch information
3 people authored Mar 13, 2024
1 parent 4dd13fc commit 5fcc0cd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/renderer/src/stories/JSONSchemaForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,9 @@ export class JSONSchemaForm extends LitElement {

// Allow referring to floats as null (i.e. JSON NaN representation)
if (e.message === "is not of a type(s) number") {
if ((resolvedValue === "NaN") | (resolvedValue === null)) return;
else if (isRow) e.message = `${e.message}. ${templateNaNMessage}`;
if (resolvedValue === "NaN") return;
else if (resolvedValue === null) {
} else if (isRow) e.message = `${e.message}. ${templateNaNMessage}`;
}

const prevHeader = name ? header(name) : "Row";
Expand Down

0 comments on commit 5fcc0cd

Please sign in to comment.