Merge branch 'ent-9131-Falla-carga-de-eventos-v762-ante-eventos-especificos' into 'develop'

Fix possible custom_data with null strings

See merge request artica/pandorafms!4952
This commit is contained in:
Daniel Rodriguez 2022-06-21 08:31:53 +00:00
commit 529ce88d00
1 changed files with 2 additions and 2 deletions

View File

@ -2311,7 +2311,7 @@ function process_datatables_item(item) {
item.evento = evn;
/* Group name */
if (item.id_grupo == "0") {
if (typeof item.id_grupo === 'undefined' || item.id_grupo == "0") {
item.id_grupo = "<?php echo __('All'); ?>";
} else {
item.id_grupo = item.group_name;
@ -2331,7 +2331,7 @@ function process_datatables_item(item) {
}
})(item.custom_data);
if (item_custom_data_obj !== false) {
if (item_custom_data_obj !== false && item_custom_data_obj !== null) {
for (const [attr_name, val] of Object.entries(item_custom_data_obj)) {
custom_data_str += attr_name + ' = ' + val + '<br>';
}