Fix type issue.
This commit is contained in:
parent
1e4cbc769c
commit
bee6d21d82
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue