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:
zhi
2026-03-03 18:06:14 +00:00
parent be8fe835d0
commit ed5ffd6c53

View File

@@ -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));
} }