// provide fallback if mappedState is undefined
mappedState = mapStateOnServer({
htmlAttributes: {}, // object here
title: "",
baseTag: {}, // object here
metaTags: [],
linkTags: [],
scriptTags: [],
styleTags: []
});
It causes a React warning:
Warning: React.createElement(...): Expected props argument of html to be a plain object
A workaround:
let html_attributes = webpage_head.htmlAttributes.toComponent()
// Fixing `react-helmet` bug here
// until they release the fix
// https://github.com/nfl/react-helmet/issues/158
if (Array.isArray(html_attributes))
{
// A workaround
html_attributes = {}
}
https://github.com/nfl/react-helmet/blob/17eb00abcf71d57f51827575d37c2ae8ed9997fb/src/Helmet.js#L402
And at the same time:
Which means that it should be:
It causes a React warning:
A workaround: