Skip to content

Commit 066744d

Browse files
Merge pull request #1 from MasonProtter/patch-1
Fixes to PR updating Observables.
2 parents c259287 + b81c58a commit 066744d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "WebIO"
22
uuid = "0f1e0344-ec1d-5b48-a673-e5cf874b6c29"
33
license = "MIT"
4-
version = "0.8.18"
4+
version = "0.8.19"
55

66
[deps]
77
AssetRegistry = "bf4720bc-e11a-5d0c-854e-bdca1663c893"
@@ -24,7 +24,7 @@ AssetRegistry = "0.1.0"
2424
FunctionalCollections = "0.5.0"
2525
JSExpr = "0.5"
2626
JSON = "0.18, 0.19, 0.20, 0.21"
27-
Observables = "0.4, 0.5"
27+
Observables = "0.5"
2828
Requires = "0.4.4, 0.5, 1.0.0"
2929
WebSockets = "1.5.0"
3030
Widgets = "0.6.2"

src/scope.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ function JSON.lower(scope::Scope)
242242
if sync === nothing
243243
# by default, we sync if there are any listeners
244244
# other than the JS back edge
245-
sync = any(f-> !isa(f, SyncCallback), listeners(ob))
245+
sync = any(((_, f),) -> !isa(f, SyncCallback), listeners(ob))
246246
end
247247
obs_dict[k] = Dict(
248248
"sync" => sync,
@@ -378,7 +378,7 @@ end
378378
function ensure_sync(ctx, key)
379379
ob = ctx.observs[key][1]
380380
# have at most one synchronizing handler per observable
381-
if !any(x->isa(x, SyncCallback) && x.ctx==ctx, listeners(ob))
381+
if !any(((_, x),) ->isa(x, SyncCallback) && x.ctx==ctx, listeners(ob))
382382
f = SyncCallback(ctx, (msg) -> send_update_observable(ctx, key, msg))
383383
on(SyncCallback(ctx, f), ob)
384384
end

0 commit comments

Comments
 (0)