Skip to content

Commit 24fc2e9

Browse files
committed
refactor(doctor): reuse TTS plugin location matcher
1 parent a118102 commit 24fc2e9

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

src/commands/doctor/shared/legacy-config-migrations.runtime.tts.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,7 @@ function hasLegacyTtsProviderKeys(value: unknown): boolean {
3232
}
3333

3434
function hasLegacyPluginEntryTtsProviderKeys(value: unknown): boolean {
35-
const entries = getRecord(value);
36-
if (!entries) {
37-
return false;
38-
}
39-
return Object.entries(entries).some(([pluginId, entryValue]) => {
40-
if (isBlockedObjectKey(pluginId) || !LEGACY_TTS_PLUGIN_IDS.has(pluginId)) {
41-
return false;
42-
}
43-
const entry = getRecord(entryValue);
44-
const config = getRecord(entry?.config);
45-
return hasLegacyTtsProviderKeys(config?.tts);
46-
});
35+
return hasLegacyTtsInPluginLocations(value, hasLegacyTtsProviderKeys);
4736
}
4837

4938
function hasLegacyTtsEnabled(value: unknown): boolean {

0 commit comments

Comments
 (0)