Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

Commit

Permalink
Fix error on logged out homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
muan committed Sep 6, 2018
1 parent deefd9f commit b5dffcf
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,18 @@ function init () {
details.appendChild(container)

const newDashboard = document.querySelector('.page-responsive [data-src*="/dashboard/recent-activity"], .js-recent-activity-container')
const oldDashboard = document.querySelector('.news')
if (newDashboard) {
newDashboard.after(details)
} else {
} else if(oldDashboard) {
// org or user condition
summary.classList.remove('btn-sm')
details.classList.add(context === 'org' ? 'mt-3' : 'mt-5')
document.querySelector('.news').prepend(details)

oldDashboard.prepend(details)
}
applyPreference()

if (newDashboard || oldDashboard) applyPreference()
}

function rememberPreference () {
Expand Down

0 comments on commit b5dffcf

Please sign in to comment.