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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'Release Notes' link on versions page #86

Merged
merged 3 commits into from Dec 20, 2017

Conversation

jakewtaylor
Copy link
Contributor

This fixes a problem with the 'Release Notes' link on the versions page.

There was an unwrapped ternary expression:

<a
  href={
    "https://github.com/facebook/react-native/releases/tag/v" +
    version +
    ".0" +
    isRc
      ? "-rc.0"
      : ""
  }
>
  Release Notes
</a>

Which evaluates like:

("https://github.com/facebook/react-native/releases/tag/v" + version + ".0" + isRc) ? "-rc.0" : ""

Making the href attribute always -rc.0.

The fix just wraps the ternary statement in brackets, for the intended functionality:

<a
  href={
    "https://github.com/facebook/react-native/releases/tag/v" +
    version +
    ".0" +
    (isRC ? "-rc.0" : "")
  }
>
  Release Notes
</a>

Which, obviously, evaluates like:

"https://github.com/facebook/react-native/releases/tag/v" + version + ".0" + (isRc ? "-rc.0" : "")

I also fixed unique 'key' prop warnings in the same file, by moving the key to the VersionItem component itself rather than the tr element inside the VersionItem component.

Also some Prettier fixes that were nothing to do with me, but couldn't commit without them. 馃槢

The 'Release Notes' link was broken due to an unwrapped ternary expression.
Moved the 'key' prop from the root `<tr>` element in `VersionItem` to `VersionItem` itself.
@hramos hramos merged commit 0bd372c into facebook:master Dec 20, 2017
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.

None yet

2 participants