diff --git a/chrome/content/zotero/xpcom/db.js b/chrome/content/zotero/xpcom/db.js index d68664b6d3..791d79b137 100644 --- a/chrome/content/zotero/xpcom/db.js +++ b/chrome/content/zotero/xpcom/db.js @@ -466,6 +466,12 @@ Zotero.DBConnection.prototype.executeTransaction = async function (func, options } var conn = this._getConnection(options) || (await this._getConnectionAsync(options)); + + if (func.constructor.name == 'GeneratorFunction') { + throw new Error("Zotero.DB.executeTransaction() no longer takes a generator function " + + "-- pass an async function instead"); + } + var result = await conn.executeTransaction(func); Zotero.debug(`Committed DB transaction ${id}`, 4);