innoboxrr-vue-datatable 1.2.21 → 1.2.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -196,9 +196,15 @@
|
|
|
196
196
|
},
|
|
197
197
|
|
|
198
198
|
setData(head, body) {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
199
|
+
try {
|
|
200
|
+
// Verifica que `parser` es una función y la ejecuta de forma segura
|
|
201
|
+
return typeof head.parser === 'function'
|
|
202
|
+
? head.parser(body[head.id], { ...body }) // Clona `body` para evitar mutaciones
|
|
203
|
+
: body[head.id];
|
|
204
|
+
} catch (error) {
|
|
205
|
+
console.error("Error en parser:", error);
|
|
206
|
+
return null; // Evita que errores interrumpan el renderizado
|
|
207
|
+
}
|
|
202
208
|
},
|
|
203
209
|
|
|
204
210
|
closeDropdown(event){
|