Skip to content

Commit

Permalink
Fixed split call on undefined issue with loading guests name and titl…
Browse files Browse the repository at this point in the history
…e from transistor service.
  • Loading branch information
ingerbird committed Sep 4, 2024
1 parent e9c4c65 commit 47a4bc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/transistor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const parseEpisodeTitle = (
guest: { name?: string; title?: string };
} => {
const [title, guest] = str.split(' - ');
const [guestName, guestTitle] = guest.split(', ');
const [guestName = '', guestTitle = ''] = guest?.split(', ') || [];

return {
title,
Expand Down

0 comments on commit 47a4bc7

Please sign in to comment.