From bb0eab303587f434fbe26cf80900738a2ab329af Mon Sep 17 00:00:00 2001 From: Daniel Almaguer Date: Tue, 14 Jul 2020 15:29:23 -0500 Subject: [PATCH] fix(docs): fix hash routes (#418) --- packages/docs/components/NextLink/NextLink.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/docs/components/NextLink/NextLink.tsx b/packages/docs/components/NextLink/NextLink.tsx index 89aed14dc..3b69c483b 100644 --- a/packages/docs/components/NextLink/NextLink.tsx +++ b/packages/docs/components/NextLink/NextLink.tsx @@ -3,6 +3,10 @@ import { default as NLink } from 'next/link'; import React from 'react'; function getLinkAs(as = '') { + if (!as) { + return undefined; + } + const prefix = process.env.URL_PREFIX || ''; return prefix + as;