From 74ccc124622fb500cbbac147ffd0da4f4391413c Mon Sep 17 00:00:00 2001 From: Gabriel Grubba Date: Thu, 19 Dec 2024 18:31:00 -0300 Subject: [PATCH] DEV: Add falsy check for default value --- .../javascripts/admin/components/fields/da-base-field.gjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/automation/admin/assets/javascripts/admin/components/fields/da-base-field.gjs b/plugins/automation/admin/assets/javascripts/admin/components/fields/da-base-field.gjs index 534201b0e98..9e6dcb4f01c 100644 --- a/plugins/automation/admin/assets/javascripts/admin/components/fields/da-base-field.gjs +++ b/plugins/automation/admin/assets/javascripts/admin/components/fields/da-base-field.gjs @@ -5,7 +5,10 @@ export default class BaseField extends Component { constructor() { super(...arguments); - if (this.args.field.extra?.default_value) { + if ( + this.args.field.extra && + Object.keys(this.args.field.extra).includes("default_value") + ) { this.args.field.metadata.value = this.args.field.extra.default_value; } }