From c2678888be3538c841b45340563b4ef07425d5bb Mon Sep 17 00:00:00 2001 From: wukko Date: Wed, 15 May 2024 22:28:31 +0600 Subject: [PATCH] loadFromFs: clean up --- src/modules/sub/loadFromFs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/sub/loadFromFs.js b/src/modules/sub/loadFromFs.js index 3cbb1614..0fab6057 100644 --- a/src/modules/sub/loadFromFs.js +++ b/src/modules/sub/loadFromFs.js @@ -3,14 +3,14 @@ import * as fs from "fs"; export function loadJSON(path) { try { return JSON.parse(fs.readFileSync(path, 'utf-8')) - } catch(e) { + } catch { return false } } export function loadFile(path) { try { return fs.readFileSync(path, 'utf-8') - } catch(e) { + } catch { return false } }