about summary refs log tree commit diff
path: root/app/javascript/packs/public.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/javascript/packs/public.js')
-rw-r--r--app/javascript/packs/public.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/javascript/packs/public.js b/app/javascript/packs/public.js
index a9a3d738a..a86dc7831 100644
--- a/app/javascript/packs/public.js
+++ b/app/javascript/packs/public.js
@@ -83,6 +83,12 @@ function main() {
     if (reactComponents.length > 0) {
       import(/* webpackChunkName: "containers/media_container" */ '../mastodon/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);