mirror of
https://github.com/streamich/react-use.git
synced 2026-01-18 14:06:52 +00:00
fix: useSize avoid crash in Safari 11
This commit is contained in:
parent
706f660781
commit
da0e66bb89
@ -67,7 +67,7 @@ const useSize = (
|
||||
}
|
||||
|
||||
return () => {
|
||||
if (window) {
|
||||
if (window && window.removeEventListener) {
|
||||
window.removeEventListener('resize', setSize);
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user