Skip to content

Commit 7c197b4

Browse files
committedAug 6, 2020
bugfix incorrect type
1 parent c48c3d2 commit 7c197b4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎lib/watchEventSource.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ class DirectWatcher {
8181
class RecursiveWatcher {
8282
constructor(rootPath) {
8383
this.rootPath = rootPath;
84+
/** @type {Map<Watcher, string>} */
8485
this.mapWatcherToPath = new Map();
86+
/** @type {Map<string, Set<Watcher>>} */
8587
this.mapPathToWatchers = new Map();
8688
this.watcher = undefined;
8789
try {
@@ -137,7 +139,7 @@ class RecursiveWatcher {
137139
if (!subpath) return;
138140
this.mapWatcherToPath.delete(watcher);
139141
const set = this.mapPathToWatchers.get(subpath);
140-
set.delete(subpath);
142+
set.delete(watcher);
141143
if (set.size === 0) {
142144
this.mapPathToWatchers.delete(subpath);
143145
}

0 commit comments

Comments
 (0)
Please sign in to comment.