Support false as deprecated translate() argument

This commit is contained in:
Dan Stillman 2017-06-24 19:24:29 -04:00
parent 8f63a5e20d
commit 145a45e8e1

View file

@ -2040,7 +2040,7 @@ Zotero.Translate.Web.prototype._prepareTranslation = Zotero.Promise.method(funct
* Overload translate to set selectedItems
*/
Zotero.Translate.Web.prototype.translate = function (options = {}, ...args) {
if (typeof options == 'number') {
if (typeof options == 'number' || options === false) {
Zotero.debug("Translate: translate() now takes an object -- update your code", 2);
options = {
libraryID: options,