Skip to content

Commit

Permalink
fix: use Map.clear instead of creating a new Map
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Apr 24, 2021
1 parent b228c89 commit a7c8578
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/paths-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ export default class PathsCache extends EventEmitter {
this._fileWatchersByDirectory.forEach(async (watcher) => {
await watcher.close()
})
this._fileWatchersByDirectory = new Map()
this._filePathsByProjectDirectory = new Map()
this._filePathsByDirectory = new Map()
this._fileWatchersByDirectory.clear()
this._filePathsByProjectDirectory.clear()
this._filePathsByDirectory.clear()
this._repositories = []
if (this._projectWatcher) {
this._projectWatcher.dispose()
Expand Down

0 comments on commit a7c8578

Please sign in to comment.