hugo.im icon indicating copy to clipboard operation
hugo.im copied to clipboard

Warning: Failed prop type: Invalid prop `defaultTitle` of type `array` supplied to `HelmetWrapper`, expected `string`.

Open mariosffx opened this issue 5 years ago • 1 comments

Fixed by changing

<FormattedMessage id="title">
 {(txt) => (
  <Helmet defaultTitle={txt} titleTemplate={`%s | ${txt}`}>
       ....
  </Helmet>
</FormattedMessage>

to

<FormattedMessage id="title">
 {(propsTxt) => {
   const txt = propsTxt[0];
  <Helmet defaultTitle={txt} titleTemplate={`%s | ${txt}`}>
       ....
  </Helmet>
</FormattedMessage>

File: layout.js

layout.txt

mariosffx avatar Nov 09 '20 09:11 mariosffx

Hey @mariosffx! Sorry, just saw this now. Thanks for reporting. I'll add and push it! ;)

hugomn avatar Dec 20 '20 15:12 hugomn