Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ensure langauge server does not crash with no default export #577

Conversation

codythomaszeitler
Copy link

What does this PR do?

It ensures that the LWC language server does not crash if an LWC file does not have a default export.

What issues does this PR fix or reference?

forcedotcom/salesforcedx-vscode#4994

So, this change works in the following way.

It assumes that the lwc language server is adding information for just the "LWC" portion of a javascript file. (the stuff included in the default export). If it does not find an LWC, it simply returns an "empty" Internal Metadata definition to the vscode language server (since no LWC implies that no metadata information should be added to the language server).

@CristiCanizales
Copy link
Contributor

Hi @codythomaszeitler! I'm so sorry for the delay, I didn't notice this PR before but until now that we have just merged a fix for the same issue 🤡 Thank you so much anyways for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants