diff --git a/dist/js/channelProfile.js b/dist/js/channelProfile.js index 554fdb2b..7513ae5c 100644 --- a/dist/js/channelProfile.js +++ b/dist/js/channelProfile.js @@ -911,6 +911,9 @@ function resolveChannelModeration(pubkey, app = getApp()) { } const matches = collectChannelVideos(normalized, app); + if (!Array.isArray(matches)) { + return null; + } let fallbackModeration = null; let fallbackVideo = null; diff --git a/js/channelProfile.js b/js/channelProfile.js index 2a3f7794..a82143e2 100644 --- a/js/channelProfile.js +++ b/js/channelProfile.js @@ -238,7 +238,7 @@ function decorateChannelVideo(video, app = getApp()) { return decoratedVideo; } -export async function collectChannelVideos(pubkey, app = getApp()) { +export function collectChannelVideos(pubkey, app = getApp()) { const normalized = normalizeHex(pubkey); if (!normalized) { return []; @@ -928,6 +928,10 @@ function resolveChannelModeration(pubkey, app = getApp()) { } const matches = collectChannelVideos(normalized, app); + if (!Array.isArray(matches)) { + return null; + } + let fallbackModeration = null; let fallbackVideo = null;