From 43cab8e906fed4662d7ec02eef2b0076c265562e Mon Sep 17 00:00:00 2001 From: Jelle De Loecker Date: Thu, 25 Jul 2024 16:36:06 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20some=20Settings=20field=20?= =?UTF-8?q?issues?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/app/helper_field/settings_field.js | 2 +- lib/core/setting.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/app/helper_field/settings_field.js b/lib/app/helper_field/settings_field.js index 3a8215b1..ec2f485b 100644 --- a/lib/app/helper_field/settings_field.js +++ b/lib/app/helper_field/settings_field.js @@ -88,5 +88,5 @@ Settings.setMethod(function _toDatasource(context, value) { context = context.withWorkingValue(value); } - _toDatasource.super.call(this, context, value); + return _toDatasource.super.call(this, context, value); }); diff --git a/lib/core/setting.js b/lib/core/setting.js index 6920e6ef..d05c0b74 100644 --- a/lib/core/setting.js +++ b/lib/core/setting.js @@ -340,7 +340,7 @@ Definition.setMethod(function getEditorConfiguration(root_value, editor_context) let result = this.toEnumEntry(); - let value = root_value.getPath(this.setting_id); + let value = root_value ? root_value.getPath(this.setting_id) : null; if (value) { result.current_value = value.get();