mirror of
https://github.com/McShelby/hugo-theme-relearn
synced 2025-04-30 11:29:05 +08:00
topbar: avoid JS error on layouts without topbar
eg. 404 pages
This commit is contained in:
parent
8f55271c77
commit
db407309e1
@ -1903,6 +1903,7 @@ ready(function () {
|
||||
moveTopbarButtons();
|
||||
adjustEmptyTopbarContents();
|
||||
}
|
||||
if (topbar) {
|
||||
var mqs = window.matchMedia('only screen and (max-width: 47.999rem)');
|
||||
mqs.addEventListener('change', onWidthChange.bind(null, setWidthS));
|
||||
var mqm = window.matchMedia('only screen and (min-width: 48rem) and (max-width: 59.999rem)');
|
||||
@ -1916,6 +1917,7 @@ ready(function () {
|
||||
setWidthL(mql);
|
||||
moveTopbarButtons();
|
||||
adjustEmptyTopbarContents();
|
||||
}
|
||||
})();
|
||||
|
||||
(function () {
|
||||
|
@ -1 +1 @@
|
||||
7.4.1+ec1b461d3886edd1383ec154518b970e72ca3f08
|
||||
7.4.1+8f55271c7781cd53f9f3c9145035f2cbe0b4dfb5
|
Loading…
x
Reference in New Issue
Block a user