Skip to content

Commit

Permalink
Fix view update handling for dynamic field bases (#773)
Browse files Browse the repository at this point in the history
  • Loading branch information
AMNRG authored Jan 4, 2025
1 parent 384bb9e commit 969ac04
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/sycamore-view-parser/src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,9 @@ fn is_component(ident: &TagIdent) -> bool {

fn is_dyn(ex: &Expr) -> bool {
match ex {
Expr::Lit(_) | Expr::Closure(_) | Expr::Path(_) | Expr::Field(_) => false,
Expr::Lit(_) | Expr::Closure(_) | Expr::Path(_) => false,

Expr::Field(f) => is_dyn(&f.base),
Expr::Paren(p) => is_dyn(&p.expr),
Expr::Group(g) => is_dyn(&g.expr),
Expr::Tuple(t) => t.elems.iter().any(is_dyn),
Expand Down

0 comments on commit 969ac04

Please sign in to comment.