fix: dataByOrder when is null composable

This commit is contained in:
Javier Segarra 2024-11-29 22:45:42 +01:00
parent 37e557264c
commit 883104f1f1
1 changed files with 1 additions and 0 deletions

View File

@ -1,6 +1,7 @@
function orderData(data, order) {
if (typeof order === 'function') return data.sort(data);
if (typeof order === 'string') order = [order];
if (!Array.isArray(data)) return [];
if (Array.isArray(order)) {
let orderComp = [];