Fix undefined reference error when updating a table (closes #27)
This commit is contained in:
parent
d11262ad01
commit
60b01c55e1
1 changed files with 3 additions and 3 deletions
|
|
@ -131,8 +131,8 @@ export class Database {
|
|||
return false;
|
||||
};
|
||||
|
||||
const table = this.getTable(tableID);
|
||||
if (!tables[tableID]) {
|
||||
const table = await this.getTable(tableID);
|
||||
if (!table) {
|
||||
ui.notifications.error(`Cannot update table that doesn't exist`);
|
||||
return false;
|
||||
};
|
||||
|
|
@ -144,7 +144,7 @@ export class Database {
|
|||
const diff = diffObject(
|
||||
table,
|
||||
expandObject(changes),
|
||||
{ inner: true, deletionKeys: true },
|
||||
{ deletionKeys: true },
|
||||
);
|
||||
if (Object.keys(diff).length === 0) { return false };
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue