Skip to content

Commit

Permalink
'to' maybe undefined (#4216)
Browse files Browse the repository at this point in the history
  • Loading branch information
panzj authored and timdorr committed Nov 25, 2016
1 parent cbd1a95 commit e06190e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/Link.js
Expand Up @@ -105,7 +105,7 @@ const Link = React.createClass({

if (router) {
// If user does not specify a `to` prop, return an empty anchor tag.
if (to == null) { return <a {...props} /> }
if (!to) { return <a {...props} /> }

const toLocation = resolveToLocation(to, router)
props.href = router.createHref(toLocation)
Expand Down

1 comment on commit e06190e

@alphakevin
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

undefined == null // true

Please sign in to comment.