Skip to content

Commit

Permalink
fix: Clearing a field result in the wrong type (closes #1022)
Browse files Browse the repository at this point in the history
  • Loading branch information
claustres committed Dec 20, 2024
1 parent 45bd25b commit 044abe9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/client/mixins/mixin.base-field.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ export const baseField = {
invalidate (error) {
this.error = error
},
async onChanged (value) {
async onChanged () {
// Quasar resets the model to null when clearing but in the schema an empty model might be a different value
const nullable = _.get(this.properties, 'nullable', false)
if (_.isNil(value) && !nullable) {
if (_.isNil(this.model) && !nullable) {
this.clear()
}
// Tell the form that this field has a new value.
Expand Down

0 comments on commit 044abe9

Please sign in to comment.