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.
master
Rafał Chłodnicki 2021-05-30 22:12:16 +02:00 committed by GitHub
parent 67f83534a2
commit 599bf60388
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -156,7 +156,9 @@ async function createProjectService(
editor: {
connection,
globalSettings: params.initializationOptions.configuration as Settings,
userLanguages: params.initializationOptions.userLanguages,
userLanguages: params.initializationOptions.userLanguages
? params.initializationOptions.userLanguages
: {},
// TODO
capabilities: {
configuration: true,