fix: simplify state update event triggering with optional chaining
This commit is contained in:
parent
0ce566f502
commit
ba82252dd7
|
@ -93,8 +93,7 @@ export default (options: ComponentOptions) => {
|
|||
})
|
||||
|
||||
// trigger state update events
|
||||
if (statesListeners && statesListeners[keyPath])
|
||||
statesListeners[keyPath](value)
|
||||
statesListeners?.[keyPath]?.(value)
|
||||
|
||||
return true
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user