Skip to content

Commit

Permalink
fix fields without specified default value defaulting to string "null"
Browse files Browse the repository at this point in the history
  • Loading branch information
konodyuk committed Dec 2, 2023
1 parent 4c5e4aa commit 7f58a02
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/typing/field.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ export class Field extends DataClass implements Bindable<FieldBindingContext, Fi
if (!this.type.context) {
this.type = this.type.bind({ field: this });
}
this.default = this.type.parseDefault(this.default);
if (this.default != null) {
this.default = this.type.parseDefault(this.default);
}
}

bind(context: FieldBindingContext) {
Expand Down

0 comments on commit 7f58a02

Please sign in to comment.