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

@ -756,12 +756,12 @@ function generateAllTypesAndFieldsData() {
* The field values should be in the form exactly as they would appear in Zotero
*/
function populateDBWithSampleData(data) {
return Zotero.DB.executeTransaction(function* () {
return Zotero.DB.executeTransaction(async function () {
for (let itemName in data) {
let item = data[itemName];
let zItem = new Zotero.Item;
zItem.fromJSON(item);
item.id = yield zItem.save();
item.id = await zItem.save();
}
return data;