Add check for if tempReminder is null

This commit is contained in:
bl00dymarie
2024-02-23 13:22:56 +01:00
parent 8150b791ed
commit 27bb25e6da
+1 -1
View File
@@ -115,7 +115,7 @@ export async function saveTemperatureTrackingCategory(bool) {
// if temperature tracking is turned off, the temperature reminder gets disabled
const tempReminderResult = await AsyncStorage.getItem('tempReminder')
if (JSON.parse(tempReminderResult).enabled) {
if (tempReminderResult && JSON.parse(tempReminderResult).enabled) {
tempReminderObservable.set(false)
}
}