Skip to content

Commit 06837ce

Browse files
committed
fix: update comment to clarify config downgrade logic for compatibility with older schema
1 parent ae0c826 commit 06837ce

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/vscode-extension/src/providers/ConfigEditorProvider.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import {
2020
Logger,
2121
Notifications,
2222
} from '../services';
23-
import { General } from '../constants';
2423
import {
2524
checkSnippetArgs,
2625
getDemoApiData,
@@ -379,6 +378,8 @@ export class ConfigEditorProvider implements CustomTextEditorProvider {
379378
}
380379

381380
// Convert to ActConfig (version 3) if version is 3, otherwise keep as DemoConfig
381+
// Reason: the config is downgraded to the DemoConfig to keep supporting the older schema in the editor,
382+
// but we want to save in the latest ActConfig format if the config is already in that format (version 3)
382383
const configToSave = config.version === 3 ? demoConfigToActConfig(config) : config;
383384

384385
const edit = new WorkspaceEdit();

0 commit comments

Comments
 (0)