diff options
author | Thibaut Girka <thib@sitedethib.com> | 2019-01-13 14:42:50 +0100 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2019-01-13 14:42:50 +0100 |
commit | 278ff1318fd9772f3663e7540b9ece020c73a953 (patch) | |
tree | 6b8e35033cebeac7d2de4b50398e4dc7b1d110f6 /app/javascript | |
parent | eff1c94744609b432c8dba8a35cd97e9a20ce652 (diff) |
[Glitch] Add attachment list fallback to public pages
Port JS changes from 4fb94c758e3bf2e1c0525e9075c2d5dedc14c666 to glitch-soc
Diffstat (limited to 'app/javascript')
-rw-r--r-- | app/javascript/flavours/glitch/packs/public.js | 6 |
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); |