From 640fad7e96468ac116db865d7fd082e811575f8a Mon Sep 17 00:00:00 2001 From: JustSong Date: Wed, 23 Nov 2022 16:06:22 +0800 Subject: [PATCH] fix: disable new version alert when REACT_APP_VERSION is not set --- web/src/App.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/src/App.js b/web/src/App.js index c741e20..ca0908a 100644 --- a/web/src/App.js +++ b/web/src/App.js @@ -39,7 +39,8 @@ function App() { localStorage.setItem('footer_html', data.footer_html); if ( data.version !== process.env.REACT_APP_VERSION && - data.version !== 'v0.0.0' + data.version !== 'v0.0.0' && + process.env.REACT_APP_VERSION !== '' ) { showNotice( `新版本可用:${data.version},请使用快捷键 Shift + F5 刷新页面`