From 662c6be43527873abf5f12c8342e23f1d2438d28 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 3 Sep 2024 11:39:01 +0200 Subject: [PATCH] Use optional chaining Co-authored-by: Sam Rose --- packages/server/src/sdk/app/views/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/sdk/app/views/index.ts b/packages/server/src/sdk/app/views/index.ts index 0feb970586..099cb75dc9 100644 --- a/packages/server/src/sdk/app/views/index.ts +++ b/packages/server/src/sdk/app/views/index.ts @@ -282,7 +282,7 @@ export async function renameLinkedViews(table: Table, renaming: RenameColumn) { return tableField.tableId === table._id })) { - const columns = view.schema && view.schema[relField]?.columns + const columns = view.schema?.[relField]?.columns if (columns && columns[renaming.old]) { columns[renaming.updated] = columns[renaming.old]