From e06190e06a7cebcced96aa708be83174176186a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E5=BF=97=E5=9D=9A?= Date: Sat, 26 Nov 2016 01:39:23 +0800 Subject: [PATCH] 'to' maybe undefined (#4216) --- modules/Link.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Link.js b/modules/Link.js index fcab089092..7547114999 100644 --- a/modules/Link.js +++ b/modules/Link.js @@ -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 } + if (!to) { return } const toLocation = resolveToLocation(to, router) props.href = router.createHref(toLocation)