From 056da116dea64632a47fe99fbf9163344d4d5f10 Mon Sep 17 00:00:00 2001 From: mertmit Date: Wed, 14 Sep 2022 20:37:46 +0300 Subject: [PATCH] fix: use ref value instead & drop unnecessary logic Signed-off-by: mertmit --- .../nc-gui/components/smartsheet-column/AdvancedOptions.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/components/smartsheet-column/AdvancedOptions.vue b/packages/nc-gui/components/smartsheet-column/AdvancedOptions.vue index d037b14b44..2df03d1e7d 100644 --- a/packages/nc-gui/components/smartsheet-column/AdvancedOptions.vue +++ b/packages/nc-gui/components/smartsheet-column/AdvancedOptions.vue @@ -40,8 +40,8 @@ vModel.value.ai = !!vModel.value.ai vModel.value.au = !!vModel.value.au onBeforeMount(() => { - // Postgres returns default value wrapped with single quotes & sometimes casted with type so we have to remove them to keep it unified for all databases - if (isPg && vModel.value.cdf.indexOf(`'`) !== vModel.value.cdf.lastIndexOf(`'`)) { + // Postgres returns default value wrapped with single quotes & casted with type so we have to get value between single quotes to keep it unified for all databases + if (isPg.value && vModel.value.cdf) { vModel.value.cdf = vModel.value.cdf.substring(vModel.value.cdf.indexOf(`'`) + 1, vModel.value.cdf.lastIndexOf(`'`)) } })