Skip to content

Commit 2134727

Browse files
committed
fix: nimiq config
1 parent 20df385 commit 2134727

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/nimiq-vitepress-theme/src/composables/useNimiqConfig.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ export interface NimiqVitepressConfig {
99
}
1010

1111
export function useNimiqConfig(): NimiqVitepressConfig {
12-
// Check if running in browser environment and config is available
13-
if (typeof window !== 'undefined' && typeof __NIMIQ_VITEPRESS_CONFIG__ !== 'undefined') {
12+
// Vite's define works in both browser and SSR environments
13+
if (typeof __NIMIQ_VITEPRESS_CONFIG__ !== 'undefined') {
1414
return __NIMIQ_VITEPRESS_CONFIG__
1515
}
1616

17-
// For SSR or when config is not available, return fallback
17+
// Fallback only when config is truly not available
1818
return {
1919
repoURL: undefined,
2020
contentPath: '',

0 commit comments

Comments
 (0)