mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Fixed issue with simple object as binding context.
This commit is contained in:
@@ -1220,4 +1220,15 @@ export function test_BindingToRelatedProps() {
|
||||
model.prop2 = "Tralala";
|
||||
|
||||
TKUnit.assertEqual(target2.get('targetProp2'), "Tralala");
|
||||
}
|
||||
|
||||
export function test_only_Bindable_BindingContext_Null_DoesNotThrow() {
|
||||
var options: bindable.BindingOptions = {
|
||||
sourceProperty: "a.b",
|
||||
targetProperty: "test"
|
||||
}
|
||||
var obj = new bindable.Bindable();
|
||||
obj.bind(options);
|
||||
obj.bindingContext = new observable.Observable({ a: "b" });
|
||||
obj.bindingContext = null;
|
||||
}
|
||||
Reference in New Issue
Block a user