From 4f2a430c7714e4ce95a2927c2edc3efe00829037 Mon Sep 17 00:00:00 2001 From: Chris LaFreniere <40371649+chlafreniere@users.noreply.github.com> Date: Thu, 23 Jun 2022 17:14:39 -0700 Subject: [PATCH] Fix Uncalled Function (#19819) --- extensions/notebook/src/book/bookTocManager.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/extensions/notebook/src/book/bookTocManager.ts b/extensions/notebook/src/book/bookTocManager.ts index 2ad7fe606a..4e481d24c2 100644 --- a/extensions/notebook/src/book/bookTocManager.ts +++ b/extensions/notebook/src/book/bookTocManager.ts @@ -58,7 +58,6 @@ export class BookTocManager implements IBookTocManager { */ getInitFile(files: string[]): path.ParsedPath | undefined { let initFile = undefined; - // const initFileIndex = files.findIndex(f => f === 'index.md'); // If it doesnt find a file named as 'index.md' then use the first file we find. @@ -165,7 +164,7 @@ export class BookTocManager implements IBookTocManager { contents.forEach(async (content) => { let filePath = path.join(directory, content); let fileStat = await fs.stat(filePath); - if (fileStat.isFile) { + if (fileStat.isFile()) { //check if the file is in the moved files let newPath = this.movedFiles.get(filePath); if (newPath) { @@ -177,7 +176,7 @@ export class BookTocManager implements IBookTocManager { await fs.unlink(filePath); } } - } else if (fileStat.isDirectory) { + } else if (fileStat.isDirectory()) { await this.cleanUp(filePath); } });