diff --git a/js/file-manager.js b/js/file-manager.js index 70a3524d..489496d6 100644 --- a/js/file-manager.js +++ b/js/file-manager.js @@ -174,7 +174,7 @@ define([ } // Remove sync attributes localStorage.removeItem(syncAttributes.syncIndex); - fileDesc.syncLocations.removeItem(syncIndex); + fileDesc.syncLocations.removeItem(syncAttributes.syncIndex); if(!skipExtensions) { extensionMgr.onSyncRemoved(fileDesc, syncAttributes); } @@ -218,7 +218,7 @@ define([ } // Remove publish attributes localStorage.removeItem(publishAttributes.publishIndex); - fileDesc.publishLocations.removeItem(publishIndex); + fileDesc.publishLocations.removeItem(publishAttributes.publishIndex); if(!skipExtensions) { extensionMgr.onPublishRemoved(fileDesc, publishAttributes); } diff --git a/js/publisher.js b/js/publisher.js index 579d6e5a..a9fd18fb 100644 --- a/js/publisher.js +++ b/js/publisher.js @@ -89,8 +89,7 @@ define([ var content = getPublishContent(publishAttributes); // Call the provider - var provider = providerMap[publishAttributes.provider]; - provider.publish(publishAttributes, publishTitle, content, function(error) { + publishAttributes.provider.publish(publishAttributes, publishTitle, content, function(error) { if(error !== undefined) { var errorMsg = error.toString(); if(errorMsg.indexOf("|removePublish") !== -1) { diff --git a/js/synchronizer.js b/js/synchronizer.js index 5f43354f..f1c47261 100644 --- a/js/synchronizer.js +++ b/js/synchronizer.js @@ -73,7 +73,7 @@ define([ } if(uploadFlag) { // Update syncAttributes in localStorage - localStorage[syncIndex] = utils.serializeAttributes(syncAttributes); + localStorage[syncAttributes.syncIndex] = utils.serializeAttributes(syncAttributes); } locationUp(callback); }