From 412a9886cc340962b1ea9452182acb14d02fe53a Mon Sep 17 00:00:00 2001 From: shirakaba <14055146+shirakaba@users.noreply.github.com> Date: Wed, 1 May 2024 00:28:12 +0900 Subject: [PATCH] fix(core): unregress bindable.updateOptions() --- packages/core/ui/core/bindable/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/core/ui/core/bindable/index.ts b/packages/core/ui/core/bindable/index.ts index a737f80f2..5e13cb611 100644 --- a/packages/core/ui/core/bindable/index.ts +++ b/packages/core/ui/core/bindable/index.ts @@ -635,8 +635,9 @@ export class Binding { try { if (isEventOrGesture(options.property, optionsInstance) && types.isFunction(value)) { - // calling off method with null as handler will remove all handlers for options.property event - optionsInstance.off(options.property, null, optionsInstance.bindingContext); + // Calling Observable.prototype.off() with just the event name will + // remove all handlers under that event name. + optionsInstance.off(options.property); optionsInstance.on(options.property, value, optionsInstance.bindingContext); } else if (optionsInstance instanceof Observable) { optionsInstance.set(options.property, value);