From 278ff1318fd9772f3663e7540b9ece020c73a953 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Sun, 13 Jan 2019 14:42:50 +0100 Subject: [PATCH] [Glitch] Add attachment list fallback to public pages Port JS changes from 4fb94c758e3bf2e1c0525e9075c2d5dedc14c666 to glitch-soc --- app/javascript/flavours/glitch/packs/public.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/javascript/flavours/glitch/packs/public.js b/app/javascript/flavours/glitch/packs/public.js index 342c5265e..56012ba78 100644 --- a/app/javascript/flavours/glitch/packs/public.js +++ b/app/javascript/flavours/glitch/packs/public.js @@ -61,6 +61,12 @@ function main() { if (reactComponents.length > 0) { import(/* webpackChunkName: "containers/media_container" */ 'flavours/glitch/containers/media_container') .then(({ default: MediaContainer }) => { + [].forEach.call(reactComponents, (component) => { + [].forEach.call(component.children, (child) => { + component.removeChild(child); + }); + }); + const content = document.createElement('div'); ReactDOM.render(, content);