From bb70d30b0d216a7201d4344f1f64b33bd21ff762 Mon Sep 17 00:00:00 2001 From: Michael Best Date: Sat, 3 Jun 2017 01:49:00 -0700 Subject: [PATCH] Don't expose inheritParentVm --- src/binding/bindingAttributeSyntax.js | 1 - src/binding/defaultBindings/ifIfnotWith.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) 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 {