Skip to content

Commit

Permalink
Fix issue to add first paragraph on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
minottic committed Apr 4, 2024
1 parent 36fa6f1 commit ebb7594
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -682,4 +682,10 @@ describe('LogbookItemComponent', () => {
expect(component.mobile).toEqual(true);
});

it('should open dialog with or without last', () => {
const dialogOpenMock = spyOn(component.dialog, 'open');
component.openDialog();
expect(dialogOpenMock.calls.mostRecent().args[1].data['defaultTags']).toEqual(undefined);
});

});
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ export class LogbookItemComponent implements OnInit {
const dialogConfig = new MatDialogConfig();
dialogConfig.autoFocus = true;
dialogConfig.disableClose = true;
dialogConfig.data = { "defaultTags": this.childSnippets.last.snippet.tags, "config": this.config }
dialogConfig.data = { "defaultTags": this.childSnippets?.last?.snippet?.tags, "config": this.config }
const dialogRef = this.dialog.open(AddContentComponent, dialogConfig);
}

Expand Down

0 comments on commit ebb7594

Please sign in to comment.