mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-10-22 09:32:12 +00:00
fix cloning
This commit is contained in:
1 parent
46fcdb4bb2
commit
e230d55b82
1 file changed
+3
@@ -17,6 +17,9 @@ import {
|
||||
import { immerable, isDraft, original, freeze } from 'immer';
|
||||
|
||||
function cloneJSON<T>(obj: T): T {
|
||||
if (obj === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (obj === null || typeof obj !== 'object') {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user