From 7574318ba8fcf233295cd5857bbae271449fabb1 Mon Sep 17 00:00:00 2001 From: "russell@unturf.com" Date: Sun, 8 Feb 2026 13:13:44 -0500 Subject: [PATCH] Fix static content not switching: hard navigate when no active media --- make_post_sell/static/js/watch.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/make_post_sell/static/js/watch.js b/make_post_sell/static/js/watch.js index 556ae68..3a3b29f 100644 --- a/make_post_sell/static/js/watch.js +++ b/make_post_sell/static/js/watch.js @@ -175,12 +175,20 @@ function transitionTo(data) { var isPlayable = (data.media_type === 'video' || data.media_type === 'audio'); - if (isPlayable && activeMedia && data.media_type === currentMediaType) { + // From a static page, always hard navigate (no media container to swap into) + if (!activeMedia) { + if (data.canonical_url) { + window.location.href = data.canonical_url; + } + return; + } + + if (isPlayable && data.media_type === currentMediaType) { crossfade(data); } else if (isPlayable) { hardSwap(data); } else { - // Static content (PDF, image, etc.) — hard navigate + // Next item is static content — hard navigate if (data.canonical_url) { window.location.href = data.canonical_url; }