Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit 93bee95

Browse files
committed
Code review: pass 'true' for another visitAll()-_clearCachedData() loop
that follows the same potentially-inefficient pattern. Ian & I can't figure out when this code would ever be needed - receiving a change event for something that's not watched is nearly impossible, and it won't have any cached data to clear anyway. We should probably remove this code in the future. See #7155 (comment) & follow-on comments for more.
1 parent 7650bbc commit 93bee95

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/filesystem/FileSystem.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,8 @@ define(function (require, exports, module) {
720720
if (!watchedRoot || !watchedRoot.filter(directory.name, directory.parentPath)) {
721721
this._index.visitAll(function (entry) {
722722
if (entry.fullPath.indexOf(directory.fullPath) === 0) {
723-
entry._clearCachedData();
723+
// Passing 'true' for a similar reason as in _unwatchEntry() - see #7150
724+
entry._clearCachedData(true);
724725
}
725726
}.bind(this));
726727

0 commit comments

Comments
 (0)