Skip to content

Commit

Permalink
Social links in metadata page doesn't have the metadata page permalink.
Browse files Browse the repository at this point in the history
Fixes #8322
  • Loading branch information
josegar74 authored and fxprunayre committed Sep 2, 2024
1 parent 36951d1 commit 849619b
Showing 1 changed file with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -588,15 +588,20 @@
},
link: function (scope, element, attrs) {
scope.mdService = gnUtilityService;
scope.$watch(scope.md, function (newVal, oldVal) {
if (newVal !== null && newVal !== oldVal) {
$http
.get("../api/records/" + scope.md.getUuid() + "/permalink")
.then(function (r) {
scope.socialMediaLink = r.data;
});
}
});

scope.$watch(
"md",
function (newVal, oldVal) {
if (newVal !== null && newVal !== oldVal) {
$http
.get("../api/records/" + scope.md.getUuid() + "/permalink")
.then(function (r) {
scope.socialMediaLink = r.data;
});
}
},
true
);
}
};
}
Expand Down

0 comments on commit 849619b

Please sign in to comment.