mirror of
https://github.com/gethinode/hinode.git
synced 2025-10-18 07:23:09 +00:00
Fix reference to undefined getLocalStorage in navbar
This commit is contained in:
@@ -7,7 +7,10 @@ const colorsBG = ['body', 'secondary', 'tertiary']
|
||||
function updateNavbar () {
|
||||
if (window.scrollY > 75) {
|
||||
navbar.classList.add('nav-active')
|
||||
const storedTheme = getLocalStorage('theme', null, 'functional')
|
||||
let storedTheme
|
||||
if (typeof getLocalStorage === "function") {
|
||||
storedTheme = getLocalStorage('theme', null, 'functional')
|
||||
}
|
||||
if (storedTheme) {
|
||||
navbar.setAttribute('data-bs-theme', storedTheme)
|
||||
}
|
||||
|
Reference in New Issue
Block a user