minhnt-dev: only ssr
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
const isEmpty = (value : any) => {
|
||||
return (
|
||||
value == null || // From standard.js: Always use === - but obj == null is allowed to check null || undefined
|
||||
(typeof value === 'object' && Object.keys(value).length === 0) ||
|
||||
(typeof value === 'string' && value.trim().length === 0)
|
||||
)
|
||||
}
|
||||
|
||||
export { isEmpty }
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import isEmpty from "lodash/isEmpty";
|
||||
import { isEmpty } from "@/utils/lodash";
|
||||
|
||||
const keyMapping = {
|
||||
// 3 query key để phân loại
|
||||
|
||||
+1
-3
@@ -1,7 +1,5 @@
|
||||
import cloneDeep from 'lodash/cloneDeep';
|
||||
|
||||
export function buildTree(data: any) {
|
||||
const _array = cloneDeep(JSON.parse(data))
|
||||
const _array = JSON.parse(JSON.stringify(JSON.parse(data)))
|
||||
if (_array.length > 0) {
|
||||
let map = new Map();
|
||||
_array.forEach((item : any) => map.set(item.id, item));
|
||||
|
||||
Reference in New Issue
Block a user