diff --git a/src/binding/bindingAttributeSyntax.js b/src/binding/bindingAttributeSyntax.js index 7dabc0aff..0e2955331 100755 --- a/src/binding/bindingAttributeSyntax.js +++ b/src/binding/bindingAttributeSyntax.js @@ -122,7 +122,6 @@ } } } - ko.bindingContext.inheritParentVm = inheritParentVm; // Extend the binding context hierarchy with a new view model object. If the parent context is watching // any observables, the new child context will automatically get a dependency on the parent context. diff --git a/src/binding/defaultBindings/ifIfnotWith.js b/src/binding/defaultBindings/ifIfnotWith.js index 345b29e89..498afc591 100755 --- a/src/binding/defaultBindings/ifIfnotWith.js +++ b/src/binding/defaultBindings/ifIfnotWith.js @@ -24,7 +24,7 @@ function makeWithIfBinding(bindingKey, isWith, isNot) { isWith ? bindingContext['createChildContext'](valueAccessor) : ifCondition.isActive() ? - new ko.bindingContext(ko.bindingContext.inheritParentVm, bindingContext, null, function() { ifCondition(); }) : + bindingContext['extend'](function() { ifCondition(); return null; }) : bindingContext, element); } else {