Open
Description
preventDefault()
works fine before the first await
in an async function, so this code works as expected, but if currently flagged:
document.querySelector('a').addEventListener('click', e => {
e.preventDefault();
await fetch('/');
});
It's only after the first await
, where preventDefault
stops working. I suggest the rule to only flag preventDefault()
after the first await
.
Metadata
Assignees
Labels
No labels
Activity