fix: dataByOrder when is null composable
This commit is contained in:
parent
37e557264c
commit
883104f1f1
|
@ -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 = [];
|
||||
|
||||
|
|
Loading…
Reference in New Issue