Browse Source

fix(nocodb): view can be undefined in hook test

pull/5349/head
Wing-Kam Wong 2 years ago
parent
commit
62286c41ea
  1. 4
      packages/nocodb/src/lib/meta/helpers/webhookHelpers.ts

4
packages/nocodb/src/lib/meta/helpers/webhookHelpers.ts

@ -146,8 +146,8 @@ export function constructWebHookData(hook, model, view, prevData, newData) {
data: { data: {
table_id: model.id, table_id: model.id,
table_name: model.title, table_name: model.title,
view_id: view.id, view_id: view?.id,
view_name: view.title, view_name: view?.title,
...(prevData && { ...(prevData && {
previous_rows: Array.isArray(prevData) ? prevData : [prevData], previous_rows: Array.isArray(prevData) ? prevData : [prevData],
}), }),

Loading…
Cancel
Save