We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aa2c821 commit c26292dCopy full SHA for c26292d
2 files changed
.changeset/yellow-cycles-carry.md
@@ -0,0 +1,5 @@
1
+---
2
+"hot-hook": patch
3
4
+
5
+Don't throw when a dependent file node is missing. This can happen when a file has been deleted
packages/hot_hook/src/dependency_tree.ts
@@ -115,7 +115,8 @@ export default class DependencyTree {
115
const currentPath = queue.pop()!
116
if (!invalidatedFiles.has(currentPath)) {
117
const node = this.#pathMap.get(currentPath)
118
- if (!node) throw new Error(`Node ${currentPath} does not exist`)
+ if (!node) continue
119
120
node.version++
121
invalidatedFiles.add(currentPath)
122
queue.push(...Array.from(node.dependents).map((n) => n.path))
0 commit comments