Skip to content

Commit 6581f82

Browse files
committed
fix: #388 check for time entry undefined
1 parent eacc592 commit 6581f82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/app/modules/time-entries/pages/time-entries.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class TimeEntriesComponent implements OnInit {
4040
}
4141

4242
saveEntry(entry): void {
43-
if (this.activeTimeEntry !== null) {
43+
if (this.activeTimeEntry !== null && this.activeTimeEntry !== undefined) {
4444
const entryDateAsIso = new Date(entry.start_date).toISOString();
4545
const entryDateAsLocalDate = new Date(entryDateAsIso);
4646
const activeEntryAsLocaldate = new Date(this.activeTimeEntry.start_date);

0 commit comments

Comments
 (0)