|
|
@@ -109,14 +109,14 @@ const RecordFastSleep = memo((props: { data: any, type: string, index: number, d
|
|
|
var isMulti = false;
|
|
|
var tempTZ = '';
|
|
|
if (props.data.fast) {
|
|
|
- if (props.data.fast.real_start_timezone.gmt) {
|
|
|
+ if (props.data.fast.real_start_timezone && props.data.fast.real_start_timezone.gmt) {
|
|
|
tempTZ = props.data.fast.real_start_timezone.gmt
|
|
|
if (props.data.fast.real_start_timezone.gmt != currentTZ) {
|
|
|
isDiff = true
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (props.data.fast.real_end_timezone.gmt) {
|
|
|
+ if (props.data.fast.real_end_timezone && props.data.fast.real_end_timezone.gmt) {
|
|
|
if (tempTZ != props.data.fast.real_end_timezone.gmt) {
|
|
|
isMulti = true
|
|
|
}
|
|
|
@@ -128,7 +128,7 @@ const RecordFastSleep = memo((props: { data: any, type: string, index: number, d
|
|
|
}
|
|
|
|
|
|
if (props.data.sleep) {
|
|
|
- if (props.data.sleep.real_start_timezone.gmt) {
|
|
|
+ if (props.data.sleep.real_start_timezone && props.data.sleep.real_start_timezone.gmt) {
|
|
|
if (tempTZ == '') {
|
|
|
tempTZ = props.data.sleep.real_start_timezone.gmt
|
|
|
}
|
|
|
@@ -140,7 +140,7 @@ const RecordFastSleep = memo((props: { data: any, type: string, index: number, d
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (props.data.sleep.real_end_timezone.gmt) {
|
|
|
+ if (props.data.sleep.real_end_timezone && props.data.sleep.real_end_timezone.gmt) {
|
|
|
if (tempTZ != props.data.sleep.real_end_timezone.gmt) {
|
|
|
isMulti = true
|
|
|
}
|
|
|
@@ -183,7 +183,7 @@ const RecordFastSleep = memo((props: { data: any, type: string, index: number, d
|
|
|
if (global.checkAccess) {
|
|
|
global.checkAccess((res as any).access, true)
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (global.delFastSleep)
|
|
|
global.delFastSleep(props.data)
|
|
|
|
|
|
@@ -425,7 +425,7 @@ const RecordFastSleep = memo((props: { data: any, type: string, index: number, d
|
|
|
|
|
|
function recordTime() {
|
|
|
var timestamp = props.data.first_real_check_time
|
|
|
- if (props.data.first_timezone.gmt) {
|
|
|
+ if (props.data.first_timezone && props.data.first_timezone.gmt) {
|
|
|
timestamp = TimeFormatter.transferTimestamp(timestamp, props.data.first_timezone.gmt)
|
|
|
}
|
|
|
return TimeFormatter.dateDescription(timestamp, true)
|
|
|
@@ -435,7 +435,7 @@ const RecordFastSleep = memo((props: { data: any, type: string, index: number, d
|
|
|
var timeZoneFormatted = getTimezone()
|
|
|
|
|
|
if (multiTimeZone) {
|
|
|
- if (props.data.first_timezone.id) {
|
|
|
+ if (props.data.first_timezone && props.data.first_timezone.id) {
|
|
|
if (Taro.getSystemInfoSync().platform == 'ios') {
|
|
|
if (props.data.first_timezone.id == getTimezoneId()) {
|
|
|
return recordTime()
|