Skip to content

Commit 1fb385c

Browse files
committed
add optimisation back as its impactful
1 parent ae589bf commit 1fb385c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/session-state.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ class SessionState {
124124
}
125125

126126
async _updateSnapshotStorage(storage) {
127-
while (this.atomized && this.atomized.flushing) await this.atomized.flushed()
127+
if (!this.atomized || !this.atomized.flushing) return this.treeInfo()
128+
while (this.atomized.flushing) await this.atomized.flushed()
128129

129130
let rx = storage.read()
130131
const headPromise = rx.getHead()

0 commit comments

Comments
 (0)