fix error, if widget has no change handler

This commit is contained in:
ralf 2022-03-01 14:40:58 +02:00
parent 2d6770ebfa
commit 185e0eaf95

View File

@ -3884,7 +3884,7 @@ export class et2_nextmatch_header_bar extends et2_DOMWidget implements et2_INext
let change = function(_node)
{
// Call previously set change function
const result = widget_change.call(_widget, _node, header.nextmatch, _widget);
const result = widget_change?.call(_widget, _node, header.nextmatch, _widget);
// Find current value in activeFilters
let entry = header.nextmatch.activeFilters;
@ -4727,4 +4727,4 @@ export class et2_nextmatch_customfilter extends et2_nextmatch_filterheader
}
}
et2_register_widget(et2_nextmatch_customfilter, ['nextmatch-customfilter']);
et2_register_widget(et2_nextmatch_customfilter, ['nextmatch-customfilter']);