We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 434ac09 commit 0bcf7bbCopy full SHA for 0bcf7bb
1 file changed
packages/opencode/src/share/share-next.ts
@@ -25,8 +25,9 @@ export namespace ShareNext {
25
disposed: false,
26
}),
27
async (s) => {
28
- // Perform cleanup inline to avoid calling state() during Instance disposal.
29
- // Calling state() here could reinitialize after the Instance has been disposed.
+ // Perform cleanup inline using the provided state object.
+ // We cannot call the exported dispose() function here because it calls state(),
30
+ // which could reinitialize after the Instance has been disposed.
31
s.disposed = true
32
for (const unsub of s.subscriptions) {
33
unsub()
0 commit comments