mirror of
https://github.com/misode/misode.github.io.git
synced 2026-05-01 21:23:12 +00:00
Fix default being reused and shared
This commit is contained in:
+1
-2
@@ -436,8 +436,7 @@ function generateObject(data, struct, options) {
|
||||
}
|
||||
}
|
||||
if (data[field.id] === undefined && field.default !== undefined) {
|
||||
console.warn(`Set ${field.id} to default ${field.default}`)
|
||||
data[field.id] = field.default;
|
||||
data[field.id] = JSON.parse(JSON.stringify(field.default));
|
||||
}
|
||||
if (field.collapse) {
|
||||
let hasNoValue = typeof data[field.id] !== 'object';
|
||||
|
||||
Reference in New Issue
Block a user