mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 08:45:12 +02:00
Fix possible custom_data with null strings
This commit is contained in:
parent
8a5847a225
commit
73a124b299
@ -2315,7 +2315,7 @@ function process_datatables_item(item) {
|
|||||||
item.evento = evn;
|
item.evento = evn;
|
||||||
|
|
||||||
/* Group name */
|
/* Group name */
|
||||||
if (item.id_grupo == "0") {
|
if (typeof item.id_grupo === 'undefined' || item.id_grupo == "0") {
|
||||||
item.id_grupo = "<?php echo __('All'); ?>";
|
item.id_grupo = "<?php echo __('All'); ?>";
|
||||||
} else {
|
} else {
|
||||||
item.id_grupo = item.group_name;
|
item.id_grupo = item.group_name;
|
||||||
@ -2335,7 +2335,7 @@ function process_datatables_item(item) {
|
|||||||
}
|
}
|
||||||
})(item.custom_data);
|
})(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)) {
|
for (const [attr_name, val] of Object.entries(item_custom_data_obj)) {
|
||||||
custom_data_str += attr_name + ' = ' + val + '<br>';
|
custom_data_str += attr_name + ' = ' + val + '<br>';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user