catch error when git repo is unavailable

This commit is contained in:
Mylloon 2022-06-23 16:16:56 +02:00
parent 9a4720e887
commit c58221c4d5
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -19,7 +19,10 @@ async function get() {
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
data = Buffer.from(json.content, json.encoding).toString('utf8'); data = Buffer.from(json.content, json.encoding).toString('utf8');
timestamp = now; timestamp = now;
})); }))
.catch(() => {
data = "# Constnium";
});
} }
return data; return data;