Skip to content

Commit

Permalink
Editor / Distribution / Properly refresh list link on last one
Browse files Browse the repository at this point in the history
Follow up of #7468

Refresh list when user remove the last link of a record. In that case md.link is undefined and we need to reload distributions.
  • Loading branch information
fxprunayre authored Mar 6, 2024
1 parent c5c93f0 commit ac3e63b
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -486,14 +486,12 @@
scope.config = gnRelatedResources;

scope.$watchCollection("md.link", function (n, o) {
if (n && n !== o) {
if (scope.md != null && scope.md.link) {
scope.loadDistributions(scope.md.link);
}
if (scope.md != null && n !== o) {
scope.loadDistributions(scope.md.link);
}
});

if (scope.md != null && scope.md.link) {
if (scope.md != null) {
scope.loadDistributions(scope.md.link);
}
}
Expand Down

0 comments on commit ac3e63b

Please sign in to comment.