Check write not scheduled in scope destructor #33156
See issue comment
This isn't needed for Node 15 but does fix Node 12. I couldn't see a way to make a PR against Node 12 however. The diff for the Node 12 fix is in the issue comment.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines