fix: shallow merge

This commit is contained in:
chenos 2023-01-09 15:41:08 +08:00
parent fd71d57bdf
commit dd157e2fd0

View File

@ -340,7 +340,7 @@ export class UiSchemaRepository extends Repository {
await this.clearXUidPathCache(rootUid, transaction); await this.clearXUidPathCache(rootUid, transaction);
if (!newSchema['properties']) { if (!newSchema['properties']) {
const s = await this.model.findByPk(rootUid, { transaction }); const s = await this.model.findByPk(rootUid, { transaction });
s.set({ ...s.toJSON(), ...newSchema }); s.set('schema', { ...s.toJSON(), ...newSchema });
// console.log(s.toJSON()); // console.log(s.toJSON());
await s.save({ transaction, hooks: false }); await s.save({ transaction, hooks: false });
return; return;