diff --git a/src/ShipFit/FitLink.tsx b/src/ShipFit/FitLink.tsx index 08fa9f7..7a1e8d5 100644 --- a/src/ShipFit/FitLink.tsx +++ b/src/ShipFit/FitLink.tsx @@ -8,7 +8,7 @@ export const FitLink = () => { const link = useEveShipFitLink(); /* Detect if the fit is loaded on https://eveship.fit */ - const isEveShipFit = window.location.hostname === "eveship.fit"; + const isEveShipFit = typeof window !== "undefined" && window.location.hostname === "eveship.fit"; const linkText = isEveShipFit ? "link to fit" : "open on eveship.fit"; return