Cosmetic bug in GPX import.
This commit is contained in:
parent
55164ef2a3
commit
cef7431012
|
@ -1,4 +1,4 @@
|
|||
import { cloneDeep } from 'lodash';
|
||||
import { cloneDeep, isEmpty } from 'lodash';
|
||||
import { PureComponent } from 'react';
|
||||
import { $DEVCOMP } from 'solid-js';
|
||||
import { Point, Rectangle } from '../components/map/types';
|
||||
|
@ -111,12 +111,15 @@ const prune = (
|
|||
...extensions,
|
||||
...subObjects[index].extensions,
|
||||
};
|
||||
if (isEmpty(subObjects[index].extensions)) {
|
||||
subObjects[index].extensions = undefined;
|
||||
}
|
||||
docs.push({
|
||||
_id: getUri(key, subId),
|
||||
type: key,
|
||||
doc: subObjects[index],
|
||||
});
|
||||
prune(subId, subObjects[index], previousGpx, extensions, docs);
|
||||
prune(subId, subObjects[index], previousGpx, {}, docs);
|
||||
}
|
||||
object[key] = undefined;
|
||||
} else prune(id, object[key], previousGpx, extensions, docs);
|
||||
|
|
Loading…
Reference in New Issue