Skip to content

Commit

Permalink
Fix undefined serverId in Person card (#5817)
Browse files Browse the repository at this point in the history
* Fix undefined serverId in Person card

* Use ServerConnections instead of globals

* Update src/components/cardbuilder/cardBuilder.js

Co-authored-by: Bill Thornton <thornbill@users.noreply.github.com>

---------

Co-authored-by: Bill Thornton <thornbill@users.noreply.github.com>
  • Loading branch information
viown and thornbill authored Aug 20, 2024
1 parent 6a8f21e commit d470238
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/cardbuilder/cardBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,9 @@ function getHoverMenuHtml(item, action) {
let html = '';

html += '<div class="cardOverlayContainer itemAction" data-action="' + action + '">';
const url = appRouter.getRouteUrl(item);
const url = appRouter.getRouteUrl(item, {
serverId: item.ServerId || ServerConnections.currentApiClient().serverId()
});
html += '<a href="' + url + '" class="cardImageContainer"></a>';

const btnCssClass = 'cardOverlayButton cardOverlayButton-hover itemAction paper-icon-button-light';
Expand Down

0 comments on commit d470238

Please sign in to comment.