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

Fix error when referencing undefined parameters variable #1760

Merged
merged 3 commits into from
Jan 10, 2024
Merged

Fix error when referencing undefined parameters variable #1760

merged 3 commits into from
Jan 10, 2024

Conversation

krethan
Copy link
Contributor

@krethan krethan commented Jan 5, 2024

When parameters variable is undefined it is generating an error when trying to reference parameters.name. Added check to ensure parameters.name is defined before updating the connection information. There is also no need to update the connection information if parameters.name is undefined.

@krethan
Copy link
Contributor Author

krethan commented Jan 5, 2024

2 commits as I updated the contributions.md seperately.

@chrjorgensen
Copy link
Collaborator

Hi @krethan !

Thank you for your contribution to this project - really appreciated!

One question: How can I reproduce the error, that your change is fixing? I haven't seen this before...

@worksofliam
Copy link
Contributor

@chrjorgensen I believe this shows up in the debug console (during debug) or the developer consider (during runtime). I have seen this!

@krethan
Copy link
Contributor Author

krethan commented Jan 6, 2024

When you try to open a connection the variable parameters will be undefined and gives this error in the debug console:

image

Parameters is undefined:

image

The connection was refused:

image

@worksofliam worksofliam self-requested a review January 8, 2024 16:09
Copy link
Contributor

@worksofliam worksofliam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@krethan I left one small request - otherwise, working as expected. Thanks!

Changing let to const as suggested.
@krethan
Copy link
Contributor Author

krethan commented Jan 10, 2024

@worksofliam Changed the let to const and moved it into the if block.

This issue is occuring when setting up the connection for the first time after the extension is installed. After a connection is successful this is not an issue anymore.

@worksofliam worksofliam requested a review from a team January 10, 2024 05:50
@worksofliam
Copy link
Contributor

Just retested and works as expected. This error had been lingering for a while, so it's nice to see it fixed.

Thanks for your PR!

@worksofliam worksofliam merged commit e3569b6 into codefori:master Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants