From b94e607fdd194a893b9e5266d8484b2a6c9c244c Mon Sep 17 00:00:00 2001 From: Frank Bennett Date: Wed, 29 Nov 2023 11:57:38 +0900 Subject: [PATCH] Throw concisely, avoid false-positive error in checkCourtMap() --- cultexp/make-data.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cultexp/make-data.js b/cultexp/make-data.js index 929a4e6..782a81f 100755 --- a/cultexp/make-data.js +++ b/cultexp/make-data.js @@ -35,7 +35,7 @@ var configPath = path.join(".", "make-data-config.json"); * @param {string} e.message - error message */ const handleError = (e) => { - throw e; + // throw e; console.log(`ERROR: ${e.message}`); process.exit(); }; @@ -274,7 +274,7 @@ SetupTool.prototype.addCourtMapEntry = function(line) { SetupTool.prototype.checkCourtMap = function() { var missingCodes = [], badCodes = []; for (var info of this.courtMap) { - if (info[1] === "") { + if (info[0] !== "" && info[1] === "") { missingCodes.push(info[0]); } else if (!this.jurisObj[this.defaultJurisdiction].courts[info[1]]) { badCodes.push(`${info[1]} (${info[0]})`);