maatma: avoid useless alert

This commit is contained in:
nemunaire 2019-03-25 23:43:09 +01:00
parent ddd8da6395
commit 4babb470cd

View File

@ -81,8 +81,9 @@ angular.module("AdLinApp")
$rootScope.checkLoginState();
$location.url("/");
}, function(response) {
alert(response.data.errmsg);
$scope.pleaseWait = false;
if (response.data && response.data.errmsg)
alert(response.data.errmsg);
});
}
})
@ -111,7 +112,8 @@ angular.module("AdLinApp")
}).then(function(response) {
$scope.tunnels = response.data;
}, function(response) {
alert(response.data.errmsg);
if (response.data && response.data.errmsg)
alert(response.data.errmsg);
});
};
$scope.updateTunnelsList();
@ -130,8 +132,8 @@ angular.module("AdLinApp")
$scope.updateTunnelsList();
$scope.pleaseWaitNew = false;
}, function(response) {
alert(response.data.errmsg);
$scope.pleaseWaitNew = false;
alert(response.data.errmsg);
});
}
@ -148,8 +150,8 @@ angular.module("AdLinApp")
$scope.updateTunnelsList();
tunnel.pleaseWaitDrop = false;
}, function(response) {
alert(response.data.errmsg);
tunnel.pleaseWaitDrop = false;
alert(response.data.errmsg);
});
}
})
@ -224,8 +226,8 @@ angular.module("AdLinApp")
$scope.updateAssociationD();
$scope.pleaseWaitNewAssociation = false;
}, function(response) {
alert(response.data.errmsg);
$scope.pleaseWaitNewAssociation = false;
alert(response.data.errmsg);
});
}