Skip to content

Commit

Permalink
docs(engine-core): add comment in patchDynamicEventListeners regardin…
Browse files Browse the repository at this point in the history
…g freezing assumption
  • Loading branch information
gaurav-rk9 committed Feb 28, 2025
1 parent c6721f9 commit 9388256
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ export function patchDynamicEventListeners(
data: { dynamicOn },
} = vnode;

// The argument passed to lwc:on is frozen.
// Because of this, we can assume that `oldVnode.data.dynamicOn` is
// deeply equal to its value from the previous render cycle.
const oldDynamicOn =
isNull(oldVnode) || isUndefined(oldVnode.data.dynamicOn)
? EmptyObject
Expand Down

0 comments on commit 9388256

Please sign in to comment.