fix(install): clone function handle undefined
- clone(undefined) now returns undefined instead of throwing JSON.parse error - This fixes install when plugins.entries.dirigent doesn't exist yet
This commit is contained in:
@@ -122,6 +122,7 @@ function findLatestInstallRecord() {
|
|||||||
|
|
||||||
// Deep clone
|
// Deep clone
|
||||||
function clone(v) {
|
function clone(v) {
|
||||||
|
if (v === undefined) return undefined;
|
||||||
return JSON.parse(JSON.stringify(v));
|
return JSON.parse(JSON.stringify(v));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user