erikras / erikras/react-redux-universal-hot-example

Helmet.rewind might be undefined in Html.js

Open
#773 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12.1k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

Hey,

in Html.js helper there is `const head = Helmet.rewind();` It might be undefined if there was no `` declared in current route. It will fail here (can't access property 'base' of undefined):

```
{head.base.toComponent()}
{head.title.toComponent()}
{head.meta.toComponent()}
{head.link.toComponent()}
{head.script.toComponent()}
```

I'm not sure if we can treat is as a bug because it works with current example setup (there is `` inside App.js). Maybe it should be checked for undefined and issue a warning to let know developer that there is no helmet declaration inside current route. Or maybe if it is undefined we should try to render it.

calling @sergesemashko as he provided PR for Helmet.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.