Skip to content

Commit 459f08c

Browse files
committed
only call __updated() if we get a hook
Closes #4196.
1 parent 2c85671 commit 459f08c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

assets/js/phoenix_live_view/view.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,8 @@ export default class View {
606606

607607
patch.after("updated", (el) => {
608608
if (updatedHookIds.has(el.id)) {
609-
this.getHook(el).__updated();
609+
const hook = this.getHook(el);
610+
hook && hook.__updated();
610611
}
611612
});
612613

0 commit comments

Comments
 (0)