Felipe Diogo
You can add throw error
after line 55 and it will do just that. However, it will have the side effect of the error being thrown in the sync loop (more info on this here). To address that, you can use a microtask
implementation as I discussed with liunian in a comment on the main article.