From c58221c4d58478c6cabaa34c00eb2bc254a23f40 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 23 Jun 2022 16:16:56 +0200 Subject: [PATCH] catch error when git repo is unavailable --- src/utils/readme.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/readme.js b/src/utils/readme.js index eeed96a..c3de297 100644 --- a/src/utils/readme.js +++ b/src/utils/readme.js @@ -19,7 +19,10 @@ async function get() { // eslint-disable-next-line no-undef data = Buffer.from(json.content, json.encoding).toString('utf8'); timestamp = now; - })); + })) + .catch(() => { + data = "# Constnium"; + }); } return data;