notebooks lgtm cleanup part 1 (#8280)

This commit is contained in:
Chris LaFreniere
2019-11-11 13:40:48 -05:00
committed by GitHub
parent 8b17b77010
commit 0520870754
8 changed files with 15 additions and 19 deletions

View File

@@ -302,7 +302,7 @@ export class BookTreeViewProvider implements vscode.TreeDataProvider<BookTreeIte
findNextUntitledFileName(filePath: string): string {
const baseName = path.basename(filePath);
let idx = 0;
let title = `${baseName}`;
let title;
do {
const suffix = idx === 0 ? '' : `-${idx}`;
title = `${baseName}${suffix}`;