Skip to content

Commit 8f84892

Browse files
committed
fix: handle id type correctly in update-table-cell where clause, fixes #974
1 parent a95a764 commit 8f84892

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/ipc-handlers/tables.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ export default (connections: Record<string, antares.Client>) => {
221221
.update({ [params.field]: `= ${escapedParam}` })
222222
.schema(params.schema)
223223
.from(params.table)
224-
.where({ [params.primary]: `= ${sqlEscaper(id)}` })
224+
.where({ [params.primary]: `= ${typeof id === 'string' ? sqlEscaper(id) : id}` })
225225
.limit(1)
226226
.run();
227227
}

0 commit comments

Comments
 (0)