tidy up null checks

This commit is contained in:
Sam Rose 2024-09-10 10:59:11 +01:00
parent 4ff0dab399
commit 7438a1d65c
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

View File

@ -399,14 +399,14 @@ export class GoogleSheetsIntegration implements DatasourcePlus {
sheet, sheet,
}) })
case Operation.CREATE_TABLE: case Operation.CREATE_TABLE:
if (json.table == null) { if (!json.table) {
throw new Error( throw new Error(
"attempted to create a table without specifying the table to create" "attempted to create a table without specifying the table to create"
) )
} }
return this.createTable(json.table) return this.createTable(json.table)
case Operation.UPDATE_TABLE: case Operation.UPDATE_TABLE:
if (json.table == null) { if (!json.table) {
throw new Error( throw new Error(
"attempted to create a table without specifying the table to create" "attempted to create a table without specifying the table to create"
) )