From 044abe99cd61891826fcd97124755c85dd72e74a Mon Sep 17 00:00:00 2001 From: Luc Claustres Date: Fri, 20 Dec 2024 12:43:15 +0100 Subject: [PATCH] fix: Clearing a field result in the wrong type (closes #1022) --- core/client/mixins/mixin.base-field.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/client/mixins/mixin.base-field.js b/core/client/mixins/mixin.base-field.js index c43fd4943..5dfb88beb 100644 --- a/core/client/mixins/mixin.base-field.js +++ b/core/client/mixins/mixin.base-field.js @@ -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.