From edfa7935dff5acdc07e0d19493aa968bcef689de Mon Sep 17 00:00:00 2001 From: Ashley Date: Sat, 31 Dec 2022 11:05:26 +0000 Subject: [PATCH] add a fix for searches --- src/libpoketube/init/pages-channel-and-download.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libpoketube/init/pages-channel-and-download.js b/src/libpoketube/init/pages-channel-and-download.js index c5e217b0..31b114f7 100644 --- a/src/libpoketube/init/pages-channel-and-download.js +++ b/src/libpoketube/init/pages-channel-and-download.js @@ -91,9 +91,11 @@ module.exports = function (app, config, renderTemplate) { h = " "; - if (j.Search.Results.DynamicItem) { - if (j.Search.Results.DynamicItem.id == "didYouMeanRenderer") { - var h = JSON.parse(j.Search.Results.DynamicItem.Title); + if (j.Search) { + if ("Results.DynamicItem" in j.Search) { + if (j.Search.Results.DynamicItem.id == "didYouMeanRenderer") { + var h = JSON.parse(j.Search.Results.DynamicItem.Title); + } } }