From 3d62277edd1454161a88312ecd6728b7a067254d Mon Sep 17 00:00:00 2001 From: Brenden Matthews Date: Wed, 24 Apr 2024 16:49:35 -0400 Subject: [PATCH] Fix type def, handle error case --- web/global.d.ts | 1 + web/next.config.mjs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/web/global.d.ts b/web/global.d.ts index 5599f1f5..e97d00dd 100644 --- a/web/global.d.ts +++ b/web/global.d.ts @@ -3,6 +3,7 @@ declare module 'next/config' { publicRuntimeConfig: { modifiedDate: string modifiedYear: string + gitHash: string? } } diff --git a/web/next.config.mjs b/web/next.config.mjs index 2adea4c7..dc9499bf 100644 --- a/web/next.config.mjs +++ b/web/next.config.mjs @@ -7,6 +7,9 @@ const config = async (_phase, { _defaultConfig }) => { git.stdout.on('data', (data) => { resolve(data.toString().trim()) }) + git.on('error', () => { + resolve(undefined) + }) }) /**