mirror of
https://github.com/wavetermdev/docusaurus-og.git
synced 2026-08-05 13:46:35 -07:00
fix: server-side build issue
This commit is contained in:
@@ -13,15 +13,11 @@ export const useBlogPluginData = () => {
|
||||
].includes(plugin[0] as string),
|
||||
)
|
||||
|
||||
if (plugins.length === 0)
|
||||
return {
|
||||
routeBasePath: '/blog',
|
||||
} as Partial<PluginOptions>
|
||||
|
||||
const plugin = plugins.find((plugin) =>
|
||||
window.location.pathname.startsWith(
|
||||
(plugin as [string, PluginOptions])[1].routeBasePath,
|
||||
),
|
||||
(typeof window !== 'undefined'
|
||||
? window.location.pathname
|
||||
: '/blog'
|
||||
).startsWith((plugin as [string, PluginOptions])[1].routeBasePath),
|
||||
)
|
||||
|
||||
if (!plugin)
|
||||
|
||||
Reference in New Issue
Block a user