Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #344 rendering body style attribute value as [object Object]. #400

Closed
wants to merge 2 commits into from

Conversation

AubreyHewes
Copy link
Contributor

@AubreyHewes AubreyHewes commented Sep 13, 2018

When setting a Helmet body style as an object (a common react practice/expectation) the style object was rendered as [object Object]

Using

<Helmet>
  <body style={{color: 'red'}} />
</Helmet>

Expected

<body style="color: red"></body>

Actual

<body style="[object Object]"></body>

This fixes that by translating the object to the expected string value while also still supporting using a string value.

This fixes #344

@CLAassistant
Copy link

CLAassistant commented Sep 13, 2018

CLA assistant check
All committers have signed the CLA.

@dmytro-lymarenko
Copy link

any news on this?

@matt-whitaker
Copy link

So is this going to get merged? Or am I going to drop react-helmet as a dependency because it appears to be virtually unmaintained?

@AubreyHewes
Copy link
Contributor Author

@matt-whitaker I never had any feedback. The problem was found when using react-static which depended on react-helmet. For those projects I used my pr-fork for a while but those projects are now migrated to either gatsby or next.js. Also I moved away from setting style on the body tag.

@AubreyHewes AubreyHewes closed this Oct 9, 2020
@AubreyHewes
Copy link
Contributor Author

fyi @cwelch5 @testerez @tmbtech

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Body style attribut is not set properly
4 participants