From cfaa6c5101e4712eb255f3743cbcd34c44c9d938 Mon Sep 17 00:00:00 2001 From: Tal Bereznitskey Date: Fri, 1 May 2020 10:45:17 +0300 Subject: [PATCH] Guard check --- src/js/lib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/lib.js b/src/js/lib.js index cab96aa..23196b7 100644 --- a/src/js/lib.js +++ b/src/js/lib.js @@ -119,7 +119,7 @@ export const createFileTree = (filter = EMPTY_FILTER) => { title = getCurrentFileLocation(title) return { title, href, parts: title.split('/') } }) - const count = fileInfo.filter(({ href }) => href.includes('#diff')).length + const count = fileInfo.filter(({ href }) => href && href.includes('#diff')).length const tree = { nodeLabel: '/', list: [],