Browse Source

fix(mind): add null defaults for dailyFortune and dominantElement props

FamilyTianpanCard 组件 dailyFortune 和 dominantElement 可能为 undefined, 增加 || {} 和 || '' 回退

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
liaoxg 1 month ago
parent
commit
766bbc1ea4
1 changed files with 2 additions and 2 deletions
  1. 2 2
      cfc-frontend/pages/mind/index.vue

+ 2 - 2
cfc-frontend/pages/mind/index.vue

@@ -12,9 +12,9 @@
     <FamilyTianpanCard
       v-if="isLoggedIn"
       :visible="isLoggedIn"
-      :fortune="dailyFortune"
+      :fortune="dailyFortune || {}"
       :mood="todayMood"
-      :dominantElement="dominantElement"
+      :dominantElement="dominantElement || ''"
       :weeklyTip="familyWeeklyInsight"
       :traditionalData="traditionalData" />