I have this small code block that returns the error:
"TypeError: object.attributeCollection.first.map is not a function"
<StyledRow>
{object.attributeCollection.first.map((attribute) => (
<LabelAssistant attribute={attribute} />
))}
</StyledRow>
The object in the console looks like this:
Can anyone suggest where I might be going wrong?
CodePudding user response:
map
is an Array method. first
being a StringAttributeModel
is not an Array.