From 3888981c74ff539a49efe04a5fbc0390f408b4ec Mon Sep 17 00:00:00 2001
From: 李凌 <344137771@qq.com>
Date: Sun, 01 Feb 2026 17:51:39 +0800
Subject: [PATCH] 1

---
 src/main.js |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/main.js b/src/main.js
index 947c03e..87015da 100644
--- a/src/main.js
+++ b/src/main.js
@@ -17,9 +17,12 @@
 
 
 const app = createApp(App)
-const title = import.meta.env.VITE_APP__TITLE
+// 安全获取环境变量,避免 undefined
+const title = import.meta.env.VITE_APP__TITLE || ''
 app.config.globalProperties.$title = title
-document.title = title
+if (title) {
+  document.title = title
+}
 app.use(fxHeader)
 app.use(i18n)
 app.use(router)

--
Gitblit v1.9.3