Skip to content

Commit a8ee5d1

Browse files
committed
fix: correctly detect if slug is passed
1 parent d19117e commit a8ee5d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/smooth/src/page/Page.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ export function getPages() {
5656
}
5757

5858
function getContentSlug({ match, history, location, pageRef }) {
59-
const { module: pageModule } = pageRef.current
59+
const { module: pageModule, isWildCard } = pageRef.current
6060

61-
if (match.params.slug === undefined) {
61+
if (!isWildCard) {
6262
if (!pageModule.contentSlug) {
6363
return pageRef.current.routePath.replace(/^\//, '')
6464
}

0 commit comments

Comments
 (0)