-
-
Notifications
You must be signed in to change notification settings - Fork 212
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
Cannot read property 'document' of undefined #846
Comments
It looks like the editor is undefined at this line calva/src/results-output/repl-history.ts Line 14 in 81ed981
Can you tell me what your project structure looks like? Would help if we could reproduce this. I can add a check for null/undefined there but I want to know why it's undefined. |
Useful info is project type (deps.edn or project.clj), and is it multi or single project open in vscode? Also please provide the steps that you took to get that error. Thanks. |
I'm not sure what do you want, it's (relatively) a big project, it a private project of the company that i'm working for, i won't be able to share everything
It's a Steps to reproduce :
|
That's helpful, thanks. Not sure if the usage of Otherwise, it may have to wait until myself or someone else has time to work on it. |
I've tried with the error have changed a bit (but are the same, as i expected both, for
The wiki is good! I just read your link and I followed it step by step without any complication! 👌 (it's rare enough to be noticed) |
Good to know the wiki is clear! So, this line is pointing to another place to add a null check:
It looks like the if (event) {
// logic
} |
I kept in const document = undefined; i added the condition in state.extensionContext.subscriptions.push(vscode.window.onDidChangeActiveTextEditor(event => {
if (event) {
const isOutputWindow = isResultsDoc(event.document);
setContextForOutputWindowActive(isOutputWindow);
if (isOutputWindow) {
setViewColumn(event.viewColumn);
}
}
})); When i start VSCode with a Clojure opened files, i have this error and syntax color (only brakets are colored)
When i jack in, i have this error
I don't know the VSCode's API, i'm i can't be more helpful |
Hmm weird. Well, I do not experience this issue myself, so I can't do much about it. We can leave it open and see if anyone else experiences the issue and may be able to debug it. |
I'm curious, in your title you say |
I'm using VS Code in french but i badly translated it |
I saw this error message while working on something else. It seems that closing documents (most of the time) causes this error. And as expected, an event is receiving an Also just switching editors by clicking the file name in Explorer seems to cause the error. |
When i try to Jack-In, in Output > Journal (Window) i have this errors
I've this VSCode's version :
Version : 1.51.0
Commit : fcac248b077b55bae4ba5bab613fd6e9156c2f0c
Date : 2020-11-05T18:16:10.374Z
Electron : 9.3.3
Chrome : 83.0.4103.122
Node.js : 12.14.1
V8 : 8.3.110.13-electron.0
OS : Linux x64 5.4.0-53-generic
And this Calva's version :
code --list-extensions --show-versions | rg calva
betterthantomorrow.calva@2.0.132
The text was updated successfully, but these errors were encountered: