Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: #388 check for time entry undefined
  • Loading branch information
enriquezrene committed Jun 16, 2020
commit 6581f82fb88913082e1a03e813bb2fb4d8458054
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class TimeEntriesComponent implements OnInit {
}

saveEntry(entry): void {
if (this.activeTimeEntry !== null) {
if (this.activeTimeEntry !== null && this.activeTimeEntry !== undefined) {
const entryDateAsIso = new Date(entry.start_date).toISOString();
const entryDateAsLocalDate = new Date(entryDateAsIso);
const activeEntryAsLocaldate = new Date(this.activeTimeEntry.start_date);
Expand Down