8000 fix(core): unregress bindable.updateOptions() · NativeScript/NativeScript@fa18c05 · GitHub
[go: up one dir, main page]

Skip to content

Commit fa18c05

Browse files
committed
fix(core): unregress bindable.updateOptions()
1 parent 099b390 commit fa18c05

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/core/ui/core/bindable/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -635,8 +635,9 @@ export class Binding {
635635

636636
try {
637637
if (isEventOrGesture(options.property, <any>optionsInstance) && types.isFunction(value)) {
638-
// calling off method with null as handler will remove all handlers for options.property event
639-
optionsInstance.off(options.property, null, optionsInstance.bindingContext);
638+
// Calling Observable.prototype.off() with just the event name will
639+
// remove all handlers under that event name.
640+
optionsInstance.off(options.property);
640641
optionsInstance.on(options.property, value, optionsInstance.bindingContext);
641642
} else if (optionsInstance instanceof Observable) {
642643
optionsInstance.set(options.property, value);

0 commit comments

Comments
 (0)
0