Skip to content

Commit

Permalink
replace Base.isexpr for compatibility reasons
Browse files Browse the repository at this point in the history
  • Loading branch information
hhaensel committed Oct 31, 2023
1 parent fc35a7e commit 3e9bf45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Elements.jl
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ It is also possible to loop over `(v, k)` or `v`; index will always be zero-base
"""
macro recur(expr)
Base.isexpr(expr, :call) && expr.args[1] == :in && (expr.args[2] = string(expr.args[2]))
expr isa Expr && expr.head == :call && expr.args[1] == :in && (expr.args[2] = string(expr.args[2]))
expr = (MacroTools.@capture(expr, y_ in z_)) ? :("$($y) in $($z isa Union{AbstractDict, AbstractVector} ? js_attr($z) : $z)") : :("$($expr)")

Expr(:kw, Symbol("v-for"), esc_expr(expr))
Expand Down

0 comments on commit 3e9bf45

Please sign in to comment.