Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
re-extract isValidDocsUrl for clarity
  • Loading branch information
bcpeinhardt committed Aug 7, 2024
commit 499f4d351d483b50f6527b744ec1256de54fecf5
3 changes: 2 additions & 1 deletion site/src/utils/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ const getBaseDocsURL = () => {
.querySelector<HTMLMetaElement>('meta[property="docs-url"]')
?.getAttribute("content");

CACHED_DOCS_URL = docsUrl && isURL(docsUrl) ? docsUrl : DEFAULT_DOCS_URL;
const isValidDocsURL = docsUrl && isURL(docsUrl);
CACHED_DOCS_URL = isValidDocsURL ? docsUrl : DEFAULT_DOCS_URL;

// If we can get the specific version, we want to include that in docs links
const version = getStaticBuildInfo()?.version.split("-")[0];
Expand Down