From f6dc07850ba95c2ee8e1c42db4372962c70cda16 Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Wed, 7 Aug 2019 15:47:49 -0400 Subject: [PATCH] Fix pinned post URL on single-user instances Previously, the URL of the dynamically-added pinned post on a single-user instance would include the username, causing the link to go to a non-existent page. This fixes that. --- templates/collection-tags.tmpl | 2 +- templates/collection.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/collection-tags.tmpl b/templates/collection-tags.tmpl index 6849fee..7cad3b7 100644 --- a/templates/collection-tags.tmpl +++ b/templates/collection-tags.tmpl @@ -141,7 +141,7 @@ function pinPost(e, postID, slug, title) { var $header = document.getElementsByTagName('header')[0]; var $pinnedNavs = $header.getElementsByTagName('nav'); // Add link to nav - var link = ''+title+''; + var link = ''+title+''; if ($pinnedNavs.length == 0) { $header.insertAdjacentHTML("beforeend", ''); } else { diff --git a/templates/collection.tmpl b/templates/collection.tmpl index 18942a9..6623a2e 100644 --- a/templates/collection.tmpl +++ b/templates/collection.tmpl @@ -176,7 +176,7 @@ function pinPost(e, postID, slug, title) { var $header = document.getElementsByTagName('header')[0]; var $pinnedNavs = $header.getElementsByTagName('nav'); // Add link to nav - var link = ''+title+''; + var link = ''+title+''; if ($pinnedNavs.length == 0) { $header.insertAdjacentHTML("beforeend", ''); } else {