fix(diagnostic/links): early return on nil note
This commit is contained in:
parent
3769079074
commit
8148f2e504
1 changed files with 4 additions and 0 deletions
|
|
@ -37,6 +37,10 @@ func (h *LinkDiagnosticHandler) Handle(ctx context.Context, raw json.RawMessage)
|
|||
return nil, err
|
||||
}
|
||||
|
||||
if note == nil {
|
||||
return make([]*dtos.LinkDiagnosticDto, 0), nil
|
||||
}
|
||||
|
||||
brokenLinks, err := h.linkRepository.GetBrokenLinks(ctx, note.ID())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue