tidy up null checks
This commit is contained in:
parent
4ff0dab399
commit
7438a1d65c
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue