Fix pinning on chorus collection page

Previously, the new pinned post link would appear in the site header,
instead of the blog header.
This commit is contained in:
Matt Baer 2019-09-03 17:42:23 -04:00
parent 954e57897b
commit 8ec25f1fb4
1 changed files with 1 additions and 1 deletions

View File

@ -174,7 +174,7 @@ function pinPost(e, postID, slug, title) {
// Visibly remove post from collection
var $postEl = document.getElementById('post-' + postID);
$postEl.parentNode.removeChild($postEl);
var $header = document.getElementsByTagName('header')[0];
var $header = document.querySelector('header:not(.multiuser)');
var $pinnedNavs = $header.getElementsByTagName('nav');
// Add link to nav
var link = '<a class="pinned" href="/{{.Alias}}/'+slug+'">'+title+'</a>';