Skip to content

Commit 699fbae

Browse files
committed
fix: TTA-50 Error when editing an entry
1 parent ce56829 commit 699fbae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/modules/shared/components/details-fields/details-fields.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { TechnologyState } from '../../store/technology.reducers';
2222
import { EntryActionTypes } from './../../../time-clock/store/entry.actions';
2323
import { SaveEntryEvent } from './save-entry-event';
2424
import { ProjectSelectedEvent } from './project-selected-event';
25-
import { get } from 'lodash';
25+
import { get, isEmpty } from 'lodash';
2626
import { DATE_FORMAT, DATE_FORMAT_YEAR } from 'src/environments/environment';
2727
import { TechnologiesComponent } from '../technologies/technologies.component';
2828
import { MatDatepicker } from '@angular/material/datepicker';
@@ -179,7 +179,7 @@ export class DetailsFieldsComponent implements OnChanges, OnInit {
179179
this.goingToWorkOnThis = this.entryToEdit?.running ? true : false;
180180
this.shouldRestartEntry = false;
181181
this.getRecentProjects();
182-
if (this.entryToEdit) {
182+
if (this.entryToEdit && !isEmpty(this.entryToEdit)) {
183183
this.isTechnologiesDisabled = false;
184184
this.selectedTechnologies = this.entryToEdit.technologies;
185185
const projectFound = this.listProjects.find((project) => project.id === this.entryToEdit.project_id);

0 commit comments

Comments
 (0)