fix(theme-editor): migration error

This commit is contained in:
chenos 2023-10-31 12:22:31 +08:00
parent 2008bfa54a
commit 2ac377161f

View File

@ -17,12 +17,8 @@ export default class ThemeEditorMigration extends Migration {
} }
const collection = this.db.getCollection('themeConfig'); const collection = this.db.getCollection('themeConfig');
if (!collection.hasField('uid')) {
collection.addField('uid', { await collection.sync();
type: 'uid',
});
}
collection.sync();
const themes = { const themes = {
[defaultTheme.uid]: defaultTheme, [defaultTheme.uid]: defaultTheme,