fs: check initialized flag and exit if false in FSWatcher onchange
After checking out the TODO comment in lib/internal/fs/watchers.js
, this PR follows the suggestion to check initialized
flag, and exits when "falsy", in favor to avoid firing events after the handle is closed.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines