feat: rewrite map state handling

This commit is contained in:
wancat committed 2024-07-31 17:54:59 +08:00
1 parent 8f6914d46c
commit 1572b2ea06
2 files changed
+69 -37

No files matched your search

+1 -1
View File
@@ -42,7 +42,7 @@ export default class DAG {
if (!node) {
throw new Error(`Node ${id} not found`)
}
return this.layers[node.layer - 1]
return this.layers[node.layer - 1] || 0
}
private setLayer(id: string) {