Use optional chaining
Co-authored-by: Sam Rose <hello@samwho.dev>
This commit is contained in:
parent
2e4ba9cb3c
commit
662c6be435
|
@ -282,7 +282,7 @@ export async function renameLinkedViews(table: Table, renaming: RenameColumn) {
|
||||||
|
|
||||||
return tableField.tableId === table._id
|
return tableField.tableId === table._id
|
||||||
})) {
|
})) {
|
||||||
const columns = view.schema && view.schema[relField]?.columns
|
const columns = view.schema?.[relField]?.columns
|
||||||
|
|
||||||
if (columns && columns[renaming.old]) {
|
if (columns && columns[renaming.old]) {
|
||||||
columns[renaming.updated] = columns[renaming.old]
|
columns[renaming.updated] = columns[renaming.old]
|
||||||
|
|
Loading…
Reference in New Issue