I am trying to check if window is undefined but how do I goddamn do it if the Node refuses to read the value of window at all?
let localStorageValue: undefined | {} = undefined
if (window !== undefined) /* qwik error: window is undefined */ {
localStorageValue = JSON.parse(localStorage.getItem(`ctx_${key}`) ?? '')
}
const store = useStore(localStorageValue ?? value)