0

I was facing error in next js site so i need to hide it https://i.stack.imgur.com/rkQFD.png

i've added this in "app.js" file and its working so it may also help you if you face this kind of issue

const noOverlayWorkaroundScript = `
  window.addEventListener('error', event => {
    event.stopImmediatePropagation()
  })

  window.addEventListener('unhandledrejection', event => {
    event.stopImmediatePropagation()
  })
`

<script dangerouslySetInnerHTML={{ __html: noOverlayWorkaroundScript }} />

Randy
  • 9,419
  • 5
  • 39
  • 56
  • Hi Jigar, thank you for sharing your thoughts. My two cents: The solution you provide is, in my eyes, a 'hack' and not a solution of any problem. This is a bad practice and should not be used by others. – Randy May 05 '23 at 09:59

0 Answers0