Skip to content

Commit

Permalink
fix calling setAttribute on undefined
Browse files Browse the repository at this point in the history
fixes an issue introduced by myself..
phoenixframework#3017
  • Loading branch information
Steffen Deusch committed Jan 23, 2024
1 parent 33f6780 commit ec1b878
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/js/phoenix_live_view/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ export default class View {
if(phxStatic){ toEl.setAttribute(PHX_STATIC, phxStatic) }
// set PHX_ROOT_ID to prevent events from being dispatched to the root view
// while the child join is still pending
fromEl.setAttribute(PHX_ROOT_ID, this.root.id)
if(fromEl){ fromEl.setAttribute(PHX_ROOT_ID, this.root.id) }
return this.joinChild(toEl)
})

Expand Down

0 comments on commit ec1b878

Please sign in to comment.