refactor(core): add stub for addEventListener in useWindow
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user