🐛 Corrige commit précédent

pull/1793/head
Maxime Quandalle 2021-10-19 12:00:48 +02:00
parent 31cdb29fc2
commit e8329dd58b
1 changed files with 2 additions and 2 deletions

View File

@ -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)
}
}, [])