add header cloak after all panels are added (#7325)

This commit is contained in:
Angus McLeod 2019-04-05 16:54:05 +11:00 committed by Jeff Wong
parent 0744d2ef73
commit 6f1652bb53
1 changed files with 4 additions and 3 deletions

View File

@ -327,9 +327,6 @@ export default createWidget("header", {
} else if (state.userVisible) {
panels.push(this.attach("user-menu"));
}
if (this.site.mobileView) {
panels.push(this.attach("header-cloak"));
}
additionalPanels.map(panel => {
if (this.state[panel.toggle]) {
@ -342,6 +339,10 @@ export default createWidget("header", {
}
});
if (this.site.mobileView) {
panels.push(this.attach("header-cloak"));
}
return panels;
};