KnockoutJS scramble exportDependencies

This commit is contained in:
the-djmaze 2024-03-03 17:30:15 +01:00
parent 667e50c9fb
commit 2876f92f4d
3 changed files with 4 additions and 4 deletions

View file

@ -102,7 +102,7 @@
// Ensure we've got a proper binding context to work with
var bindingContext = (dataOrBindingContext instanceof ko.bindingContext)
? dataOrBindingContext
: new ko.bindingContext(dataOrBindingContext, null, null, { "exportDependencies": true });
: new ko.bindingContext(dataOrBindingContext, null, null, { exportDependencies: true });
var templateName = resolveTemplateName(template, bindingContext['$data'], bindingContext);
executeTemplate(targetNodeOrNodeArray, true, templateName, bindingContext, options);
@ -248,7 +248,7 @@
var innerBindingContext = bindingContext;
if ('data' in options) {
innerBindingContext = bindingContext.createChildContext(options['data'], {
'exportDependencies': true
exportDependencies: true
});
}
templateComputed = renderTemplate(template, innerBindingContext, options, element);