[Glitch] Use modern ES syntax rather than .call

Port 899eac1a92 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Renaud Chaput
2024-02-27 16:42:05 +01:00
committed by Claire
parent c2f0ea415e
commit 0ff9800989
3 changed files with 8 additions and 8 deletions

View File

@@ -80,7 +80,7 @@ export default class MediaContainer extends PureComponent {
return (
<IntlProvider>
<>
{[].map.call(components, (component, i) => {
{Array.from(components).map((component, i) => {
const componentName = component.getAttribute('data-component');
const Component = MEDIA_COMPONENTS[componentName];
const { media, card, poll, hashtag, ...props } = JSON.parse(component.getAttribute('data-props'));