mirror of https://github.com/portainer/portainer
fix repository reload got error in remove tags
When I remove all tags, removeTags() will reload and do initView() again, but data.tags response null, that trigger data.tags.length got error.pull/2545/head
parent
6b05a35881
commit
5d9b1778ef
|
@ -81,9 +81,17 @@ angular.module('portainer.app')
|
|||
});
|
||||
return $q.all(promises);
|
||||
})
|
||||
.then(function success() {
|
||||
.then(function success(data) {
|
||||
Notifications.success('Success', 'Tags successfully deleted');
|
||||
$state.reload();
|
||||
if (data.length === 0) {
|
||||
$state.go('portainer.registries.registry.repositories', {
|
||||
id: $scope.registryId
|
||||
}, {
|
||||
reload: true
|
||||
});
|
||||
} else {
|
||||
$state.reload();
|
||||
}
|
||||
})
|
||||
.catch(function error(err) {
|
||||
Notifications.error('Failure', err, 'Unable to delete tags');
|
||||
|
|
Loading…
Reference in New Issue