Fix type issue.

This commit is contained in:
mike12345567 2023-08-11 14:42:34 +01:00
parent 1e4cbc769c
commit bee6d21d82
1 changed files with 3 additions and 3 deletions

View File

@ -10,10 +10,10 @@ import {
} from "../../../utilities/rowProcessor"
import { runStaticFormulaChecks } from "./bulkFormula"
import {
RenameColumn,
SaveTableRequest,
SaveTableResponse,
Table,
TableRequest,
UserCtx,
ViewStatisticsSchema,
ViewV2,
@ -45,7 +45,7 @@ export async function save(ctx: UserCtx<SaveTableRequest, SaveTableResponse>) {
const db = context.getAppDB()
const { rows, ...rest } = ctx.request.body
let tableToSave: Table & {
_rename?: { old: string; updated: string } | null
_rename?: { old: string; updated: string } | undefined
} = {
type: "table",
_id: generateTableID(),
@ -87,7 +87,7 @@ export async function save(ctx: UserCtx<SaveTableRequest, SaveTableResponse>) {
}
// Don't rename if the name is the same
let { _rename } = tableToSave
let _rename: RenameColumn | undefined = tableToSave._rename
/* istanbul ignore next */
if (_rename && _rename.old === _rename.updated) {
_rename = undefined