diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/editors/data-type/views/edit/editor-view-data-type-edit.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/editors/data-type/views/edit/editor-view-data-type-edit.element.ts index 56d3e8a56b..ac0bd00fcb 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/editors/data-type/views/edit/editor-view-data-type-edit.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/editors/data-type/views/edit/editor-view-data-type-edit.element.ts @@ -143,10 +143,10 @@ export class UmbEditorViewDataTypeEditElement extends UmbContextConsumerMixin(Li const selection = [this._dataType.propertyEditorAlias] || []; const modalHandler = this._modalService?.propertyEditorPicker({ selection }); - modalHandler?.onClose().then((returnValue) => { - if (!returnValue.selection) return; + modalHandler?.onClose().then(({ selection } = {}) => { + if (!selection) return; - const propertyEditorAlias = returnValue.selection[0]; + const propertyEditorAlias = selection[0]; this._selectPropertyEditor(propertyEditorAlias); }); } @@ -164,10 +164,10 @@ export class UmbEditorViewDataTypeEditElement extends UmbContextConsumerMixin(Li const selection = [this._dataType.propertyEditorUIAlias] || []; const modalHandler = this._modalService?.propertyEditorUIPicker({ selection }); - modalHandler?.onClose().then((returnValue) => { - if (!returnValue.selection) return; + modalHandler?.onClose().then(({ selection } = {}) => { + if (!selection) return; - const propertyEditorUIAlias = returnValue.selection[0]; + const propertyEditorUIAlias = selection[0]; this._selectPropertyEditorUI(propertyEditorUIAlias); }); }