Skip to content

Commit f81a4c8

Browse files
authored
Skip extra commas for getting workspace settings (#2113)
1 parent 7b32ef4 commit f81a4c8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/extension/settingsHelper.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { Packager } from "../common/packager";
99
import { SystemColorTheme } from "../common/editorColorThemesHelper";
1010
import { LogLevel } from "./log/LogHelper";
1111
import { PackagerStatusIndicator } from "./packagerStatusIndicator";
12+
import { stripJsonTrailingComma } from "../../src/common/utils";
1213

1314
export class SettingsHelper {
1415
/**
@@ -215,7 +216,7 @@ export class SettingsHelper {
215216
return [];
216217
}
217218
// Get workspace settings
218-
const workspaceSettingsContent = JSON.parse(
219+
const workspaceSettingsContent = stripJsonTrailingComma(
219220
stripJsonComments(fs.readFileSync(settingsPath, "utf-8")),
220221
);
221222
if (workspaceSettingsContent) {

0 commit comments

Comments
 (0)