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);
|
return $q.all(promises);
|
||||||
})
|
})
|
||||||
.then(function success() {
|
.then(function success(data) {
|
||||||
Notifications.success('Success', 'Tags successfully deleted');
|
Notifications.success('Success', 'Tags successfully deleted');
|
||||||
|
if (data.length === 0) {
|
||||||
|
$state.go('portainer.registries.registry.repositories', {
|
||||||
|
id: $scope.registryId
|
||||||
|
}, {
|
||||||
|
reload: true
|
||||||
|
});
|
||||||
|
} else {
|
||||||
$state.reload();
|
$state.reload();
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch(function error(err) {
|
.catch(function error(err) {
|
||||||
Notifications.error('Failure', err, 'Unable to delete tags');
|
Notifications.error('Failure', err, 'Unable to delete tags');
|
||||||
|
|
Loading…
Reference in New Issue