Skip to content

Commit

Permalink
option: fix option with idx 0 not working
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelCoding committed Oct 16, 2024
1 parent 8aeb9a2 commit e776be4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/core/data/search.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class SearchService {
return this.index.pipe(
switchMap(index => {
const idx = index ? index.get_idx_by_name(name) : undefined;
return idx ? this.getByIdx(idx) : of(undefined);
return typeof idx === "undefined" ? of(undefined) : this.getByIdx(idx);
})
);
}
Expand Down

0 comments on commit e776be4

Please sign in to comment.