mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-22 07:03:53 +08:00
fixed:当数据库的就数据不支持新特性时,增加新特性
This commit is contained in:
@@ -332,6 +332,9 @@ class FeatureManager {
|
||||
Object.keys(featureUpdates).forEach(featureKey => {
|
||||
if (features[featureKey]) {
|
||||
features[featureKey].enabled = featureUpdates[featureKey];
|
||||
} else if (this.defaultFeatures[featureKey]) {
|
||||
features[featureKey] = { ...this.defaultFeatures[featureKey] };
|
||||
features[featureKey].enabled = featureUpdates[featureKey];
|
||||
}
|
||||
});
|
||||
this.saveConfig(features);
|
||||
|
||||
Reference in New Issue
Block a user