www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 3663f13fa998c105bbe847e5ca86afede5002919
parent 186561f3202e31cb22aabefe85363a7667732653
Author: Dan Stillman <dstillman@zotero.org>
Date:   Thu, 28 Apr 2016 10:23:59 -0400

Merge pull request #979 from adomasven/fix/old-sync-credentials-to-apikey

Fixes sync error when transfering credentials from legacy to API key
Diffstat:
Mchrome/content/zotero/xpcom/sync/syncRunner.js | 7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/chrome/content/zotero/xpcom/sync/syncRunner.js b/chrome/content/zotero/xpcom/sync/syncRunner.js @@ -1278,12 +1278,11 @@ Zotero.Sync.Runner_Module = function (options = {}) { // Set in login manager || Zotero.Sync.Data.Local.getAPIKey() // Fallback to old username/password - || (yield _getAPIKeyFromLogin()); + || _getAPIKeyFromLogin(); }) var _getAPIKeyFromLogin = Zotero.Promise.coroutine(function* () { - var apiKey; let username = Zotero.Prefs.get('sync.server.username'); if (username) { // Check for legacy password if no password set in current session @@ -1293,9 +1292,9 @@ Zotero.Sync.Runner_Module = function (options = {}) { return ""; } - apiKey = yield Zotero.Sync.Runner.createAPIKeyFromCredentials(username, password); + let json = yield Zotero.Sync.Runner.createAPIKeyFromCredentials(username, password); Zotero.Sync.Data.Local.removeLegacyLogins(); - return apiKey; + return json.key; } return ""; })