From 1a2156a0c2845fc8e79a42587f8135e95226aba0 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Mon, 17 Aug 2020 16:08:40 -0400 Subject: [PATCH] REFACTOR: Remove `Discourse.BaseUrl` global --- .../javascripts/discourse/app/routes/user-invited-show.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/routes/user-invited-show.js b/app/assets/javascripts/discourse/app/routes/user-invited-show.js index 7af69e14dfd..c6d777d1725 100644 --- a/app/assets/javascripts/discourse/app/routes/user-invited-show.js +++ b/app/assets/javascripts/discourse/app/routes/user-invited-show.js @@ -1,6 +1,7 @@ import DiscourseRoute from "discourse/routes/discourse"; import Invite from "discourse/models/invite"; import showModal from "discourse/lib/show-modal"; +import { getAbsoluteURL } from "discourse-common/lib/get-url"; export default DiscourseRoute.extend({ model(params) { @@ -59,7 +60,7 @@ export default DiscourseRoute.extend({ }, editInvite(inviteKey) { - const inviteLink = `${Discourse.BaseUrl}/invites/${inviteKey}`; + const inviteLink = getAbsoluteURL(`/invites/${inviteKey}`); this.currentUser.setProperties({ finished: true, inviteLink }); const panels = [ {