Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/test/initialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export async function closeActiveNotebooks(): Promise<void> {
}
// We could have untitled notebooks, close them by reverting changes.

while ((vscode as any).notebook.activeNotebookEditor || vscode.window.activeTextEditor) {
while ((vscode as any).window.activeNotebookEditor || vscode.window.activeTextEditor) {
await vscode.commands.executeCommand('workbench.action.revertAndCloseActiveEditor');
}
// Work around VS Code issues (sometimes notebooks do not get closed).
Expand Down Expand Up @@ -102,10 +102,10 @@ async function closeWindowsInteral() {

function isANotebookOpen() {
if (
Array.isArray((vscode as any).notebook.visibleNotebookEditors) &&
(vscode as any).notebook.visibleNotebookEditors.length
Array.isArray((vscode as any).window.visibleNotebookEditors) &&
(vscode as any).window.visibleNotebookEditors.length
) {
return true;
}
return !!(vscode as any).notebook.activeNotebookEditor;
return !!(vscode as any).window.activeNotebookEditor;
Copy link
Member

Choose a reason for hiding this comment

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

There is another .notebook just above this one that also needs changing.

}