mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 10:25:16 +00:00
Fix props output
This commit is contained in:
@@ -49,7 +49,11 @@ export function cloneRecursive<T extends Object>(object: T) {
|
||||
objectCopy[key] = value.slice();
|
||||
|
||||
for (let j = 0; j < value.length; j++) {
|
||||
objectCopy[key][j] = cloneRecursive(value[j]);
|
||||
const item = value[j];
|
||||
objectCopy[key][j] =
|
||||
item && typeof item === "object"
|
||||
? cloneRecursive(item)
|
||||
: item;
|
||||
}
|
||||
} else {
|
||||
objectCopy[key] = cloneRecursive(value);
|
||||
|
||||
Reference in New Issue
Block a user