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;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
const table = this.getTable(tableID);
|
const table = await this.getTable(tableID);
|
||||||
if (!tables[tableID]) {
|
if (!table) {
|
||||||
ui.notifications.error(`Cannot update table that doesn't exist`);
|
ui.notifications.error(`Cannot update table that doesn't exist`);
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
@ -144,7 +144,7 @@ export class Database {
|
||||||
const diff = diffObject(
|
const diff = diffObject(
|
||||||
table,
|
table,
|
||||||
expandObject(changes),
|
expandObject(changes),
|
||||||
{ inner: true, deletionKeys: true },
|
{ deletionKeys: true },
|
||||||
);
|
);
|
||||||
if (Object.keys(diff).length === 0) { return false };
|
if (Object.keys(diff).length === 0) { return false };
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue