fx-compat: DB.executeTransaction() no longer takes generator functions

This commit is contained in:
Dan Stillman 2020-07-05 06:20:01 -04:00
parent ccbc785499
commit 03242e8984
41 changed files with 319 additions and 320 deletions

View file

@ -37,8 +37,8 @@ describe("Zotero.Relations", function () {
var rels = item2.getRelationsByPredicate(Zotero.Relations.relatedItemPredicate);
assert.include(rels[0], "/users/local");
yield Zotero.DB.executeTransaction(function* () {
yield Zotero.Relations.updateUser(null, 1);
yield Zotero.DB.executeTransaction(async function () {
await Zotero.Relations.updateUser(null, 1);
})
var rels = item2.getRelationsByPredicate(Zotero.Relations.relatedItemPredicate);
@ -56,8 +56,8 @@ describe("Zotero.Relations", function () {
var rels = item2.getRelationsByPredicate(Zotero.Relations.relatedItemPredicate);
assert.include(rels[0], "/users/1");
yield Zotero.DB.executeTransaction(function* () {
yield Zotero.Relations.updateUser(1, 2);
yield Zotero.DB.executeTransaction(async function () {
await Zotero.Relations.updateUser(1, 2);
});
var rels = item2.getRelationsByPredicate(Zotero.Relations.relatedItemPredicate);