diff --git a/packages/nc-gui/components/virtual-cell/Formula.vue b/packages/nc-gui/components/virtual-cell/Formula.vue index 66f75dfd14..afe746fa85 100644 --- a/packages/nc-gui/components/virtual-cell/Formula.vue +++ b/packages/nc-gui/components/virtual-cell/Formula.vue @@ -18,7 +18,10 @@ const urls = computed(() => replaceUrlsWithLink(result.value)) const { showEditNonEditableFieldWarning, showClearNonEditableFieldWarning, activateShowEditNonEditableFieldWarning } = useShowNotEditableWarning() -const renderResult = (result: string) => { +const renderResult = (result?: string | null) => { + if (!result) { + return '' + } // convert all date time values to local time // the input is always YYYY-MM-DD hh:mm:ss+xx:yy return result.replace(/\b(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\+\d{2}:\d{2})\b/g, (d) => {