From 3c5f2311e8648ed9f4b85e30c90dd7e14c4b0d35 Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Sun, 1 Oct 2023 18:16:28 -0600 Subject: [PATCH] Some whacky fixes in case shit goes down --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index fd86b0c..0c95a56 100644 --- a/index.js +++ b/index.js @@ -108,7 +108,7 @@ watcher.on("add", async (filePath, stats) => { let txtFile = filePath.replace(".wav", ".txt"); if (!fs.existsSync(txtFile)) return; vmData = fpbxFuncs.parseVoicemailInfo(fs.readFileSync(txtFile, "utf8")); - + if (!vmData) return; // Somehow this happens once in a while, not sure why let extData = await lookupExtension(vmData.origmailbox, "ext").catch((error) => { console.log(error); });