fix 'k' variable as a Number in splice method

This commit is contained in:
Alex Martzios 2022-09-23 14:49:59 +03:00
parent 717ead02b2
commit db7f34a21d
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ export class CustomizationService {
const isArray = obj instanceof Array;
for (let k in obj) {
if (obj[k] === null || obj[k] === '') {
isArray ? obj.splice(k, 1) : delete obj[k];
isArray ? obj.splice(Number.parseInt(k), 1) : delete obj[k];
} else if (typeof obj[k] === 'object') {
CustomizationService.removeNulls(obj[k]);
}