From 40041b863658bab9f9a81f744f819f720c864e5b Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 8 Aug 2022 12:07:21 +0530 Subject: [PATCH] refactor(gui-v2): remove unnecessary optional chaining Signed-off-by: Pranav C --- .../components/smartsheet-column/EditOrAdd.vue | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/nc-gui-v2/components/smartsheet-column/EditOrAdd.vue b/packages/nc-gui-v2/components/smartsheet-column/EditOrAdd.vue index 35dd0fd9fc..e941476439 100644 --- a/packages/nc-gui-v2/components/smartsheet-column/EditOrAdd.vue +++ b/packages/nc-gui-v2/components/smartsheet-column/EditOrAdd.vue @@ -37,12 +37,13 @@ const columnToValidate = [UITypes.Email, UITypes.URL, UITypes.PhoneNumber] const uiTypesOptions = computed(() => { return [ - ...uiTypes.filter((t) => !isEdit || !t.virtual), - ...(!isEdit?.value && meta?.value?.columns?.every((c) => !c.pk) + ...uiTypes.filter((t) => !isEdit.value || !t.virtual), + ...(!isEdit.value && meta?.value?.columns?.every((c) => !c.pk) ? [ { - name: 'ID', - icon: 'mdi-identifier', + name: UITypes.ID, + icon: MdiIdentifierIcon, + virtual: 0, }, ] : []), @@ -65,7 +66,7 @@ function onCancel() { // create column meta if it's a new column watchEffect(() => { - if (!isEdit?.value) { + if (!isEdit.value) { generateNewColumnMeta() } })