Skip to content

Commit

Permalink
fix: disable event fn override
Browse files Browse the repository at this point in the history
  • Loading branch information
stagas committed Feb 1, 2023
1 parent 6994901 commit 7731ca9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,13 @@ export function updateProps(doc: Doc, el: Element, type: string, next: Props = {
prev = props[name]
if (prev !== value) {
if (typeof value === 'function') {
if (prev?.fn && value?.fn) {
//!? 'updated fn'
value = prev.update(value.fn, value.options)
if (value === prev) {
next[name] = value
}
}
// if (prev?.fn && value?.fn) {
// //!? 'updated fn'
// value = prev.update(value.fn, value.options)
// if (value === prev) {
// next[name] = value
// }
// }

if (prev !== value || cacheRef !== el) {
let attr = name // toAttr[name] || name
Expand Down

0 comments on commit 7731ca9

Please sign in to comment.