]> cat aescling's git repositories - mastodon.git/commitdiff
[Glitch] Add attachment list fallback to public pages
authorThibaut Girka <thib@sitedethib.com>
Sun, 13 Jan 2019 13:42:50 +0000 (14:42 +0100)
committerThibaut Girka <thib@sitedethib.com>
Sun, 13 Jan 2019 13:42:50 +0000 (14:42 +0100)
Port JS changes from 4fb94c758e3bf2e1c0525e9075c2d5dedc14c666 to glitch-soc

app/javascript/flavours/glitch/packs/public.js

index 342c5265e9448ddbb6a8bc81d1606415d70ab336..56012ba784d2feec9da28ddef2f5bc466644c1e3 100644 (file)
@@ -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);