Skip to content

Commit

Permalink
fix(nextjs): fixed nextjs implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
BowlingX committed Jan 13, 2021
1 parent e47123d commit 78d1e19
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/adapters/Next.js.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ const GeschichteForNextjs: FC<Props> = ({ children, asPath, Router }) => {
const historyInstance: HistoryManagement = useMemo(() => {
return {
initialSearch: () => {
const [, query] = split(Router.asPath)
const [, query] =
typeof window === 'undefined' ? split(asPath) : split(Router.asPath)
return `?${query || ''}`
},
push: (next: string) => {
Expand Down

0 comments on commit 78d1e19

Please sign in to comment.