fix: [genericTemplates:filters] Make sure to always return a string when fetching data

pull/121/head
Sami Mokaddem 2022-11-15 11:27:12 +01:00
parent 6ed9978661
commit 14b41451ac
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 1 additions and 1 deletions

View File

@ -202,7 +202,7 @@ echo $this->Bootstrap->modal([
rowData['operator'] = $row.find('select.fieldOperator').val()
const $formElement = $row.find('.fieldValue');
if ($formElement.attr('type') === 'datetime-local') {
rowData['value'] = moment($formElement.val()).toISOString()
rowData['value'] = $formElement.val().length > 0 ? moment($formElement.val()).toISOString() : $formElement.val()
} else {
rowData['value'] = $formElement.val()
}