Something went wrong. Try again.
Mirror — see github.com/blacksky-algorithms/blacksky.community
Something went wrong. Try again.
fix(community-posts): YouTube iframe + gallery render guards
#9 IFRAME_HOST hardcoded to https://blacksky.community meant any non-canonical parent host (staging.blacksky.community, local dev, preview deploys) framed cross-origin and got blocked by the iframe server's X-Frame-Options: SAMEORIGIN. Read window.location.origin so the iframe always loads same-origin with the SPA. #10 ImageEmbed.tsx and MediaPreview.tsx assumed embed.view.items was always an array. A malformed gallery#view (e.g. items missing) threw TypeError on .filter / for-of and ErrorBoundary locked the whole page. Wrap in Array.isArray guards so a future appview regression degrades to 'no media' instead of 'page crashes.'
Author Rudy Fraser Date (Jun 30, 2026, 8:21 PM UTC) Commit
Copy SHA
Parent 65b307d4 65b307d423fa86a1d6ceda318bf5daa768663825