Skip to content

Commit

Permalink
fix: window href when feature link is not configured
Browse files Browse the repository at this point in the history
  • Loading branch information
Timeless0911 committed Aug 14, 2024
1 parent 906dcba commit 0d20e00
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/theme-default/src/components/HomeFeature/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ export function HomeFeature({
<div className="overflow-hidden m-auto flex flex-wrap max-w-6xl">
{features?.map(feature => {
const { icon, title, details, link: rawLink } = feature;
const link = isExternalUrl(rawLink)
? rawLink
: normalizeHrefInRuntime(withBase(rawLink, routePath));

let link = rawLink;
if (rawLink) {
link = isExternalUrl(rawLink)
? rawLink
: normalizeHrefInRuntime(withBase(rawLink, routePath));
}

return (
<div
Expand Down

0 comments on commit 0d20e00

Please sign in to comment.