KnockoutJS scramble controlsDescendantBindings

This commit is contained in:
the-djmaze 2024-03-03 17:27:18 +01:00
parent 4ee00d30ae
commit 667e50c9fb
6 changed files with 6 additions and 6 deletions

View file

@ -380,7 +380,7 @@ function applyBindingsToNodeInternal(node, sourceBindings, bindingContext) {
var initResult = handlerInitFn(node, getValueAccessor(bindingKey), allBindings, contextToExtend['$data'], contextToExtend);
// If this binding handler claims to control descendant bindings, make a note of this
if (initResult && initResult['controlsDescendantBindings']) {
if (initResult && initResult.controlsDescendantBindings) {
if (bindingHandlerThatControlsDescendantBindings !== undefined)
throw new Error("Multiple bindings (" + bindingHandlerThatControlsDescendantBindings + " and " + bindingKey + ") are trying to control descendant bindings of the same element. You cannot use these bindings together on the same element.");
bindingHandlerThatControlsDescendantBindings = bindingKey;