From dafb78869369669cf30abb32de6af683e91d6a5a Mon Sep 17 00:00:00 2001 From: Florian Date: Thu, 31 Aug 2023 09:35:29 +0200 Subject: [PATCH] fix(widget): fix errors on public shares that includes a tables widget (#503) Signed-off-by: Florian Steffens --- src/shared/components/ncTable/mixins/magicFields.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/components/ncTable/mixins/magicFields.js b/src/shared/components/ncTable/mixins/magicFields.js index f3be8610f..899b4b762 100644 --- a/src/shared/components/ncTable/mixins/magicFields.js +++ b/src/shared/components/ncTable/mixins/magicFields.js @@ -35,14 +35,14 @@ export const MagicFields = { label: t('tables', 'Me (user ID)'), icon: 'icon-user', goodFor: [ColumnTypes.TextLine, ColumnTypes.Selection, ColumnTypes.SelectionMulti, ColumnTypes.TextRich, ColumnTypes.TextLink], - replace: getCurrentUser().uid, + replace: getCurrentUser()?.uid, }), MyName: new MagicField({ id: 'my-name', label: t('tables', 'Me (name)'), icon: 'icon-user', goodFor: [ColumnTypes.TextLine, ColumnTypes.Selection, ColumnTypes.SelectionMulti, ColumnTypes.TextRich, ColumnTypes.TextLink], - replace: getCurrentUser().displayName, + replace: getCurrentUser()?.displayName, }), Checked: new MagicField({ id: 'checked',