From 62286c41ea40900efeaa61fcdc480c493ff7059b Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Mon, 3 Apr 2023 12:42:08 +0800 Subject: [PATCH] fix(nocodb): view can be undefined in hook test --- packages/nocodb/src/lib/meta/helpers/webhookHelpers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nocodb/src/lib/meta/helpers/webhookHelpers.ts b/packages/nocodb/src/lib/meta/helpers/webhookHelpers.ts index 426a9e46c2..e19673708a 100644 --- a/packages/nocodb/src/lib/meta/helpers/webhookHelpers.ts +++ b/packages/nocodb/src/lib/meta/helpers/webhookHelpers.ts @@ -146,8 +146,8 @@ export function constructWebHookData(hook, model, view, prevData, newData) { data: { table_id: model.id, table_name: model.title, - view_id: view.id, - view_name: view.title, + view_id: view?.id, + view_name: view?.title, ...(prevData && { previous_rows: Array.isArray(prevData) ? prevData : [prevData], }),