🐛 Corrige commit précédent
parent
31cdb29fc2
commit
e8329dd58b
|
@ -14,9 +14,9 @@ const useIsPrintContext = () => {
|
|||
setPrintContext(matchMediaPrint.matches)
|
||||
// `addEventListener` isn't supported by old versions of Safari and throws a
|
||||
// fatal error. See #1790 and https://stackoverflow.com/a/56466334
|
||||
matchMediaPrint?.addEventListener('change', matchListener)
|
||||
matchMediaPrint.addEventListener?.('change', matchListener)
|
||||
return () => {
|
||||
matchMediaPrint?.removeEventListener('change', matchListener)
|
||||
matchMediaPrint.removeEventListener?.('change', matchListener)
|
||||
}
|
||||
}, [])
|
||||
|
||||
|
|
Loading…
Reference in New Issue