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

Loading status bar does not hide #12

Closed
GianOrtiz opened this issue Oct 20, 2018 · 2 comments
Closed

Loading status bar does not hide #12

GianOrtiz opened this issue Oct 20, 2018 · 2 comments

Comments

@GianOrtiz
Copy link
Collaborator

While i was working in #5 i noticed an error. If you press Ctrl+Shift+P and then select Snippet: Find or Snippet: Find Inplace or Snippet: Find in new editor window and then press Esc the Loading Snippet... show up in status bar and doesn't hide. I think that when I fixed #8 I forgot to handle with this situation.

The error that occur and is prompted to console is:

TypeError: Cannot read property 'replace' of undefined
extensionHostProcess.js:89
	at asyncRequest (/home/gian/repos/vscode-snippet/out/extension.js:50:36)
...

The line that is causing this error is:

let query = encodeURI(queryRaw.replace(/ /g, '+'))

Turning loadingStatus into a global variable and adding a try/catch block in the line that is causing the error and calling loadingStatus.hide() in it should solve the error.

@mre
Copy link
Owner

mre commented Oct 20, 2018

Sounds like a good idea. Thanks for reporting this. If you find the time, you could create a pull request for that? 😊

@GianOrtiz
Copy link
Collaborator Author

I will check if solution mentioned in #12 (comment) works.

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

No branches or pull requests

2 participants