Skip to content

Commit

Permalink
fix handling of DataTypes in @mixin, fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
hhaensel committed Jan 13, 2025
1 parent ba2234f commit 11809b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/stipple/reactivity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,11 @@ function var_to_storage(T, prefix = "", postfix = ""; mode = READONLY, mixin_nam

# if m has no reactive fields, we assume that all fields should be made reactive, default mode is READONLY
if !has_reactives
for (i, (f, type, v)) in enumerate(zip(fields, values, ftypes, values))
for (i, (f, type, v)) in enumerate(zip(fields, ftypes, values))
f in [INTERNALFIELDS..., AUTOFIELDS...] && continue
rtype = Reactive{type}
ftypes[i] = rtype
values[i] = expr_isa_var(mixin_name) ? Expr(:call, rtype, Expr(:., mixin_name, QuoteNode(f)), mode) : rtype(v, mode)
values[i] = !isa(T, DataType) && expr_isa_var(mixin_name) ? Expr(:call, rtype, Expr(:., mixin_name, QuoteNode(f)), mode) : rtype(v, mode)
end
end
storage = LittleDict{Symbol, Expr}()
Expand Down

0 comments on commit 11809b7

Please sign in to comment.