diff --git a/chrome/content/zotero/charsetMenu.js b/chrome/content/zotero/charsetMenu.js index 8de8954df2..a7fd6106e9 100644 --- a/chrome/content/zotero/charsetMenu.js +++ b/chrome/content/zotero/charsetMenu.js @@ -68,7 +68,7 @@ var Zotero_Charset_Menu = new function() { Components.utils.import("resource://gre/modules/CharsetMenu.jsm"); var cmData = CharsetMenu.getData(); for (let charsetList of [cmData.pinnedCharsets, cmData.otherCharsets]) { - for each(var charsetInfo in charsetList) { + for (let charsetInfo of charsetList) { if(charsetInfo.value == "UTF-8") { charsets.push({ "label":"Unicode (UTF-8)", diff --git a/chrome/content/zotero/preferences/preferences_sync.js b/chrome/content/zotero/preferences/preferences_sync.js index 0eaf35a7d8..752ff60e33 100644 --- a/chrome/content/zotero/preferences/preferences_sync.js +++ b/chrome/content/zotero/preferences/preferences_sync.js @@ -639,7 +639,7 @@ Zotero_Preferences.Sync = { // TODO: better error handling // Verify username and password - var callback = function () { + var callback = Zotero.Promise.coroutine(function* () { Zotero.Schema.stopRepositoryTimer(); Zotero.Sync.Runner.clearSyncTimeout(); @@ -663,7 +663,7 @@ Zotero_Preferences.Sync = { var appStartup = Components.classes["@mozilla.org/toolkit/app-startup;1"] .getService(Components.interfaces.nsIAppStartup); appStartup.quit(Components.interfaces.nsIAppStartup.eRestart | Components.interfaces.nsIAppStartup.eAttemptQuit); - }; + }); // TODO: better way of checking for an active session? if (Zotero.Sync.Server.sessionIDComponent == 'sessionid=') {