editor error message

This commit is contained in:
Mo Bitar
2017-01-26 19:59:55 -06:00
parent b7492176d1
commit 3029a97c0e
4 changed files with 52 additions and 48 deletions

View File

@@ -148,11 +148,11 @@ angular.module('app.frontend')
if(success) {
if(statusTimeout) $timeout.cancel(statusTimeout);
statusTimeout = $timeout(function(){
this.saveError = false;
var status = "All changes saved"
if(syncManager.offline) {
status += " (offline)";
}
this.saveError = false;
this.noteStatus = status;
}.bind(this), 200)
} else {

View File

@@ -171,7 +171,7 @@ class SyncRunner {
}.bind(this))
.catch(function(response){
console.log("Sync error: ", response);
var error = response.data.error || {message: "Could not connect to server."};
var error = response.data ? response.data.error : {message: "Could not connect to server."};
// Re-add subItems since this operation failed. We'll have to try again.
provider.addPendingItems(subItems);