Skip to content

Cannot read properties of undefined (reading 'debug') [emacs-lsp] #1645

@gustavotcabral

Description

@gustavotcabral

Describe the bug

The language server is failing on initialization when used with the emacs-lsp client: "Cannot read properties of undefined (reading 'debug')"

I fixed it using optional chaining (?.) when accessing the .debug attribute (file server.ts):

... .['language-server']?.debug

Reproduction

Simple initialization.

Expected behaviour

The language server successfully initializes.

System Info

  • OS: Ubuntu Bionic 18.04
  • IDE: GNU Emacs 28.1 + Emacs LSP

Which package is the issue about?

svelte-language-server

Additional Information, eg. Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedFixed in master branch. Pending production release.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions