mirror of
https://github.com/Doodle3D/Doodle3D-Core.git
synced 2024-12-22 19:13:49 +01:00
fix recursiveMap function
This commit is contained in:
parent
7fd9220851
commit
1d4562e2df
@ -15,7 +15,12 @@ export function recursiveMap(objects, reviver) {
|
|||||||
if (typeof object === 'object') {
|
if (typeof object === 'object') {
|
||||||
object = recursiveMap(object, reviver);
|
object = recursiveMap(object, reviver);
|
||||||
}
|
}
|
||||||
object = reviver(i, object) || object;
|
|
||||||
|
const newObject = reviver(i, object);
|
||||||
|
if (typeof newObject !== 'undefined') {
|
||||||
|
object = newObject;
|
||||||
|
}
|
||||||
|
|
||||||
newObjects[i] = object;
|
newObjects[i] = object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user