Skip to content

Commit 4599cb3

Browse files
committed
Fix crash on invalid FFlags
Fixes #281
1 parent 664f53b commit 4599cb3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1010

1111
- Fixed document symbol crash on incomplete functions
1212
- Fixed `--base-luaurc` not registering for an LSP server
13+
- Fixed crashing on invalid FFlags configuration - the VSCode client will now validate the flags
1314

1415
## [1.16.1] - 2023-01-30
1516

editors/code/src/extension.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,10 @@ export async function activate(context: vscode.ExtensionContext) {
356356
const overridenFFlags = fflagsConfig.get<FFlags>("override");
357357
if (overridenFFlags) {
358358
for (const [name, value] of Object.entries(overridenFFlags)) {
359-
fflags[name] = value;
359+
// Validate that the name and value is valid
360+
if (name.length > 0 && value.length > 0) {
361+
fflags[name] = value;
362+
}
360363
}
361364
}
362365

0 commit comments

Comments
 (0)