refactor(core): add stub for addEventListener in useWindow

This commit is contained in:
braks
2023-10-30 13:36:07 +01:00
committed by Braks
parent 4ae371afbb
commit 2a407f59e3
4 changed files with 27 additions and 24 deletions
+6 -1
View File
@@ -4,6 +4,11 @@ export function useWindow(): UseWindow {
if (typeof window !== 'undefined') {
return window as UseWindow
} else {
return { chrome: false } as UseWindow
return {
chrome: false,
addEventListener(..._: Parameters<Window['addEventListener']>) {
// do nothing
},
} as UseWindow
}
}