Hi,
I’m trying to display data on a page with this
import React from 'react';
import { connect } from 'frontity';
const FlexibleContent = ({ flexibleContent, data }) => {
return (
<>
{flexibleContent && flexibleContent.map((content, index) => {
if (content.acf_fc_layout === "text_with_image")
return <div key={index} content={content}>Flexible content</div>;
})}
</>
);
}
export default connect(FlexibleContent);
but I get the following error coming from the content={content}
inside the
TypeError: Cannot convert undefined or null to object
I have console.logged content
and it’s an object. I can’t figure out why I receive that error.
Here is the file that is causing issue and repo Bitbucket
Any help would be hugely appreciated.
Thanks,
Jeff