mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-27 04:49:47 +01:00
fixed:当数据库的就数据不支持新特性时,增加新特性
This commit is contained in:
parent
d03583f493
commit
1e17e5ac8a
1 changed files with 3 additions and 0 deletions
|
|
@ -332,6 +332,9 @@ class FeatureManager {
|
||||||
Object.keys(featureUpdates).forEach(featureKey => {
|
Object.keys(featureUpdates).forEach(featureKey => {
|
||||||
if (features[featureKey]) {
|
if (features[featureKey]) {
|
||||||
features[featureKey].enabled = featureUpdates[featureKey];
|
features[featureKey].enabled = featureUpdates[featureKey];
|
||||||
|
} else if (this.defaultFeatures[featureKey]) {
|
||||||
|
features[featureKey] = { ...this.defaultFeatures[featureKey] };
|
||||||
|
features[featureKey].enabled = featureUpdates[featureKey];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.saveConfig(features);
|
this.saveConfig(features);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue