KnockoutJS drop unused as

This commit is contained in:
the-djmaze 2024-03-03 16:27:21 +01:00
parent 513fc949d7
commit dde1183174
4 changed files with 11 additions and 29 deletions

View file

@ -16,8 +16,7 @@ ko.bindingHandlers['foreach'] = {
// If unwrappedValue.data is the array, preserve all relevant options and unwrap again value so we get updates
ko.utils.unwrapObservable(modelValue);
return {
'foreach': unwrappedValue['data'],
'as': unwrappedValue['as']
'foreach': unwrappedValue['data']
};
},
'init': (element, valueAccessor) =>

View file

@ -7,7 +7,7 @@ function makeWithIfBinding(bindingKey, isWith, isNot) {
var savedNodes, contextOptions = {}, needAsyncContext;
if (isWith) {
contextOptions = { 'as': allBindings.get('as'), 'exportDependencies': true };
contextOptions = { 'exportDependencies': true };
}
needAsyncContext = allBindings['has'](ko.bindingEvent.descendantsComplete);