fix: simplify state update event triggering with optional chaining

This commit is contained in:
Astrian Zheng 2025-05-16 16:03:15 +10:00
parent 0ce566f502
commit ba82252dd7
Signed by: Astrian
SSH Key Fingerprint: SHA256:rVnhx3DAKjujCwWE13aDl7uV6+9U1MvydLkNRXJrBiA

View File

@ -93,8 +93,7 @@ export default (options: ComponentOptions) => {
}) })
// trigger state update events // trigger state update events
if (statesListeners && statesListeners[keyPath]) statesListeners?.[keyPath]?.(value)
statesListeners[keyPath](value)
return true return true
}, },