Skip to content

Commit c818b1f

Browse files
committed
Fix updating observables from browser with Observables.jl >= 0.4
1 parent 08aeec3 commit c818b1f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/scope.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,10 @@ end
333333

334334
(s::SyncCallback)(xs...) = s.f(xs...)
335335
"""
336-
Set observable without synchronizing with the counterpart on the browser
336+
Set observable without synchronizing with the counterpart on the browser.
337+
338+
This is mostly used to update observables in response to updates sent from th
339+
browser (so that we aren't sending the same update *back* to the browser).
337340
"""
338341
function set_nosync end
339342

@@ -346,6 +349,7 @@ if isdefined(Observables, :setexcludinghandlers)
346349
else
347350
# Observables >=0.4
348351
function set_nosync(ob, val)
352+
Observables.setexcludinghandlers!(ob, val)
349353
for f in listeners(ob)
350354
if !(f isa SyncCallback)
351355
Base.invokelatest(f, val)

0 commit comments

Comments
 (0)