fix hotreloading issues in the CLI
This commit is contained in:
37 files changed
+818
-805
No files matched your search
@@ -77,8 +77,8 @@ fn is_component_fn(item_fn: &syn::ItemFn) -> bool {
|
||||
fn get_closure_hook_body(local: &syn::Local) -> Option<&syn::Expr> {
|
||||
if let Pat::Ident(ident) = &local.pat {
|
||||
if is_hook_ident(&ident.ident) {
|
||||
if let Some((_, expr)) = &local.init {
|
||||
if let syn::Expr::Closure(closure) = &**expr {
|
||||
if let Some(init) = &local.init {
|
||||
if let syn::Expr::Closure(closure) = init.expr.as_ref() {
|
||||
return Some(&closure.body);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user