[haiz] haiz
This commit is contained in:
@ -56,4 +56,18 @@ export class Helpers {
|
||||
}
|
||||
return object
|
||||
}
|
||||
|
||||
static clearArrayWithNullObject = (array) => {
|
||||
console.log(array)
|
||||
array.forEach((element, i) => {
|
||||
const obk = this.clearObject(element)
|
||||
if (obk) array.splice(i, 1)
|
||||
})
|
||||
// for (let i = 0; i < array.length; i++) {
|
||||
// if (array[i] === null || array[i] === undefined) {
|
||||
// array.splice(i, 1)
|
||||
// }
|
||||
// }
|
||||
return array.length > 0 ? array : null
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user