Closed belcar-s closed 2 years ago
Oh that's interesting, I'd never considered this case with the new window.
Yeah I'll just skip watching if there's no path. I think once a workspace would become defined the extension would reactivate, so no need to do anything else (?)
I think once a workspace would become defined the extension would reactivate, so no need to do anything else (?)
Yup. I tested this with an extension whose activate
function just prints the workspace path:
I was worried it would be more complicated because I saw this code in DenoTaskAssistant
. I missed the return statement :).
class DenoTaskAssistant implements TaskAssistant {
provideTasks() {
const workspacePath = nova.workspace.path;
if (!workspacePath) {
return [];
}
I'm glad it's easy to fix.
Pressing ⇧⌘N opens windows that aren't associated to any folder, and opening a JavaScript file in one of those windows prompts the extension to crash.
The little arrow shown in the screenshot leads you to the following lines of code. I think
join
is throwing whenworkspacePath
is nullish.The solution might simply be to skip those lines if there's no
workspace.path
:). Unfortunately, there seems to be similar code elsewhere; solving this issue could be a little harder.