From 0d38c8203920da95791bb6ff680595237170599c Mon Sep 17 00:00:00 2001 From: Stefano Magni Date: Tue, 3 Dec 2019 21:02:09 +0100 Subject: [PATCH] Fix the getProps example (#306) According to https://github.com/reach/router/blob/master/src/index.js#L414 the `getProps` function cannot return `null`. --- website/src/markdown/api/Link.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/src/markdown/api/Link.md b/website/src/markdown/api/Link.md index 9ec1febb..1091eedc 100644 --- a/website/src/markdown/api/Link.md +++ b/website/src/markdown/api/Link.md @@ -60,7 +60,7 @@ Argument `obj` Properties: // this is only active when the location pathname is exactly // the same as the href. const isActive = ({ isCurrent }) => { - return isCurrent ? { className: "active" } : null + return isCurrent ? { className: "active" } : {} } const ExactNavLink = props => ( @@ -74,7 +74,7 @@ const isPartiallyActive = ({ }) => { return isPartiallyCurrent ? { className: "active" } - : null + : {} } const PartialNavLink = props => (