mirror of
https://github.com/streamich/react-use.git
synced 2026-01-18 14:06:52 +00:00
Merge pull request #665 from qianL93/patch-1
fix: useSize avoid crash in Safari 11
This commit is contained in:
commit
c23e105bcb
@ -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