Use modern ES syntax rather than .call (#29368)
This commit is contained in:
1 parent
6f7615ba86
commit
899eac1a92
7 files changed
+34
-28
No files matched your search
@@ -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'));
|
||||
|
||||
Reference in new issue
Block a user