Skip to content

Commit

Permalink
discussion_r1777657080 discussion_r1777658172
Browse files Browse the repository at this point in the history
  • Loading branch information
Paulo Andre Azevedo Quirino committed Sep 27, 2024
1 parent 4b67483 commit c8a78de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/editors/_shared/hooks/DataTypes/types/NumberType.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class NumberType extends DataType {

_validate(value) {
return value === undefined
|| value !== null && typeof value === this.key
&& !isNaN(value) && !Array.isArray(value);
|| (value !== null && typeof value === this.key
&& !isNaN(value) && !Array.isArray(value));
}

editComponent(props) {
Expand Down
4 changes: 3 additions & 1 deletion src/editors/_shared/hooks/DataTypes/types/ObjectType.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ class ObjectType extends DataType {
default = {};

_validate(value) {
return value === undefined || value !== null && typeof value === "object" && !Array.isArray(value);
return value === undefined || (
value !== null && typeof value === "object" && !Array.isArray(value)
);
}
}

Expand Down

0 comments on commit c8a78de

Please sign in to comment.