We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cdd61b7 commit 49bb41aCopy full SHA for 49bb41a
src/helpers/user-ratings.helper.ts
@@ -26,7 +26,7 @@ export const getTitle = (el: HTMLElement): string => {
26
};
27
28
export const getYear = (el: HTMLElement): number => {
29
- return +el.querySelectorAll('td.name .film-title-info .info')[0].text.slice(1, -1);
+ return +el.querySelectorAll('td.name .film-title-info .info')[0]?.text.slice(1, -1) || null;
30
31
32
export const getColorRating = (el: HTMLElement): CSFDColorRating => {
0 commit comments