about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-01-13 14:42:50 +0100
committerThibaut Girka <thib@sitedethib.com>2019-01-13 14:42:50 +0100
commit278ff1318fd9772f3663e7540b9ece020c73a953 (patch)
tree6b8e35033cebeac7d2de4b50398e4dc7b1d110f6 /app/javascript/flavours/glitch
parenteff1c94744609b432c8dba8a35cd97e9a20ce652 (diff)
[Glitch] Add attachment list fallback to public pages
Port JS changes from 4fb94c758e3bf2e1c0525e9075c2d5dedc14c666 to glitch-soc
Diffstat (limited to 'app/javascript/flavours/glitch')
-rw-r--r--app/javascript/flavours/glitch/packs/public.js6
1 files changed, 6 insertions, 0 deletions
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(<MediaContainer locale={locale} components={reactComponents} />, content);