Skip to content

Commit bf5d7be

Browse files
author
Lucas Araujo
committed
[DDW-812] Review: Clearer logic
1 parent 9c86f80 commit bf5d7be

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

source/main/utils/blockSyncProgressHelpers.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,9 @@ export function isItFreshLog(applicationStartDate: Moment, line: string) {
44
const [, logDate] =
55
line.match(/\[(\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}\.\d+) UTC]/) || [];
66

7-
return !!logDate && applicationStartDate.isBefore(moment.utc(logDate));
7+
if (!logDate) {
8+
return false;
9+
}
10+
11+
return applicationStartDate.isBefore(moment.utc(logDate));
812
}

0 commit comments

Comments
 (0)