From 5623296b3455dd14a6fced5aed48a1cdf91b9a30 Mon Sep 17 00:00:00 2001 From: dblake10 <162507726+dblake10@users.noreply.github.com> Date: Tue, 24 Feb 2026 18:23:07 -0600 Subject: [PATCH] tvpassport.com - Added optional chaining on elements that may not exist Added optional chaining on elements that are expected to not exist on the guide listings such as 'episodetitle' and 'year', this fixes the pull for 25 channels that were failing (out of 19,287 channels). --- sites/tvpassport.com/tvpassport.com.config.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sites/tvpassport.com/tvpassport.com.config.js b/sites/tvpassport.com/tvpassport.com.config.js index 8c4620290..5a1c0e42d 100644 --- a/sites/tvpassport.com/tvpassport.com.config.js +++ b/sites/tvpassport.com/tvpassport.com.config.js @@ -133,11 +133,11 @@ function parseTitle($item) { } function parseSubTitle($item) { - return $item('*').data('episodetitle').toString() || null + return $item('*').data('episodetitle')?.toString() || null } function parseYear($item) { - return $item('*').data('year').toString() || null + return $item('*').data('year')?.toString() || null } function parseCategory($item) { @@ -200,3 +200,4 @@ function parseCurrentTimezone(content) { return $('#timezone_selector').val() } +