Skip to content

Commit

Permalink
fix failure to start with emacs/lsp-mode (#507)
Browse files Browse the repository at this point in the history
initializationOptions was null (it's optional but the vscode client
always sets it), which resulted in this traceback:

TypeError: Cannot read property 'svelte' of undefined
+    at LSConfigManager.update (.../dist/src/ls-config.js:61:46)
+    at PluginHost.updateConfig (.../PluginHost.js:29:21)
...snip...

Fixes regression from #411
  • Loading branch information
martinxyz committed Aug 30, 2020
1 parent 58a4d69 commit 7f013c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/language-server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export function startServer(options?: LSOptions) {
}

pluginHost.initialize(!!evt.initializationOptions?.dontFilterIncompleteCompletions);
pluginHost.updateConfig(evt.initializationOptions?.config);
pluginHost.updateConfig(evt.initializationOptions?.config || {});
pluginHost.register(
(sveltePlugin = new SveltePlugin(
configManager,
Expand Down

0 comments on commit 7f013c7

Please sign in to comment.