Skip to content

Commit 599bf60

Browse files
authored
fix crash on not passing "userLanguages" option
Since the server can be used by various clients and there is no guarantee that the "userLanguages" are provided, handle that case gracefully and don't crash.
1 parent 67f8353 commit 599bf60

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/server.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,9 @@ async function createProjectService(
156156
editor: {
157157
connection,
158158
globalSettings: params.initializationOptions.configuration as Settings,
159-
userLanguages: params.initializationOptions.userLanguages,
159+
userLanguages: params.initializationOptions.userLanguages
160+
? params.initializationOptions.userLanguages
161+
: {},
160162
// TODO
161163
capabilities: {
162164
configuration: true,

0 commit comments

Comments
 (0)