Skip to content

Commit 501fa49

Browse files
committed
fix(panchang): Abhijit Muhurta is null on Wednesdays and the screen assumed it never was
The field is typed object-or-null because Abhijit coincides with Dur Muhurta on Wednesdays per Muhurta Chintamani, so reading .start off it threw one day in seven. Render the window when present and say plainly when there is none, rather than printing a broken range. Caught by the typecheck on a routine SDK bump, which is the generated client correctly reporting a nullability the screen never handled.
1 parent 4848947 commit 501fa49

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

app/(tabs)/panchang.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,11 @@ export default function PanchangScreen() {
125125
<Text className="text-base font-bold text-zinc-900 dark:text-white">
126126
{result.rahuKaal.start} - {result.rahuKaal.end}
127127
</Text>
128+
{/* Abhijit Muhurta is null on Wednesdays, when it coincides with Dur Muhurta. */}
128129
<Text className="text-xs text-zinc-500 dark:text-zinc-500 mt-2">
129-
Abhijit Muhurta {result.abhijitMuhurta.start} - {result.abhijitMuhurta.end}
130+
{result.abhijitMuhurta
131+
? `Abhijit Muhurta ${result.abhijitMuhurta.start} - ${result.abhijitMuhurta.end}`
132+
: 'No Abhijit Muhurta today'}
130133
</Text>
131134
</View>
132135
</View>

0 commit comments

Comments
 (0)