From 91d3d2596e661b1208c22f0fad49108804454a13 Mon Sep 17 00:00:00 2001 From: Harvey Tindall Date: Thu, 11 Feb 2021 13:49:06 +0000 Subject: [PATCH] fix broken invite links --- ts/modules/invites.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts/modules/invites.ts b/ts/modules/invites.ts index a1d6028..15cf695 100644 --- a/ts/modules/invites.ts +++ b/ts/modules/invites.ts @@ -45,7 +45,7 @@ export class DOMInvite implements Invite { for (let split of ["#", "?"]) { codeLink = codeLink.split(split)[0]; } - if (codeLink.slice(0, -1) != "/") { codeLink += "/"; } + if (codeLink.slice(-1) != "/") { codeLink += "/"; } this._codeLink = codeLink + "invite/" + code; const linkEl = this._codeArea.querySelector("a") as HTMLAnchorElement; if (this.label == "") {