Use optional chaining

Co-authored-by: Sam Rose <hello@samwho.dev>
This commit is contained in:
Adria Navarro 2024-09-03 11:39:01 +02:00 committed by GitHub
parent 2e4ba9cb3c
commit 662c6be435
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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]