From 81f6c169c73aa722d1c3aafe9825fc058e9ce9ea Mon Sep 17 00:00:00 2001 From: Alexandra <45508320+alexankitty@users.noreply.github.com> Date: Fri, 18 Oct 2024 03:55:59 -0600 Subject: [PATCH] add default others if no match --- lib/dircrawl.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/dircrawl.js b/lib/dircrawl.js index fbfa999..58fdb75 100644 --- a/lib/dircrawl.js +++ b/lib/dircrawl.js @@ -134,6 +134,9 @@ function findCategory(str, catList){ } } } + if(!foundCat){ + foundCat = "Others" + } } return `${foundCat} ${foundSubCat}`.trim() }