When I try and use the local storage hook in a vite project, running in dev mode, I get the following error: ``` Uncaught ReferenceError: global is not defined ``` [Line 14 of local-storage-events.ts](https://github.com/rehooks/local-storage/blob/master/src/local-storage-events.ts#L14) references `global.window`. As far as I'm aware `global` isn't a global variable in browser environments. From [this discussion](https://github.com/vitejs/vite/discussions/5912) I've gathered that most, but not all, bundlers transform `global` to `window`. Could line 14 be safely rewritten to the following? ``` if (typeof window.CustomEvent === 'function') { return; } ```