Skip to content

Commit 3f698f4

Browse files
committed
Remove destroyed windows from state
1 parent c7a57e9 commit 3f698f4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/nextjournal/clerk/webserver.clj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,9 @@
197197
(swap! !windows assoc id state)
198198
(broadcast! {:type :set-window-state! :id id :state state}))
199199

200-
(defn destroy-window! [id] (broadcast! {:type :destroy-window! :id id}))
200+
(defn destroy-window! [id]
201+
(swap! !windows dissoc id)
202+
(broadcast! {:type :destroy-window! :id id}))
201203

202204

203205
(defn broadcast-status! [status]

0 commit comments

Comments
 (0)