Skip to content

Commit

Permalink
Remove warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Feb 5, 2020
1 parent e8a0532 commit e587ce6
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions packages/next/build/utils.ts
Expand Up @@ -535,15 +535,6 @@ export async function isPageStatic(
if (hasStaticProps && hasStaticPaths) {
prerenderPaths = new Set()

const addPrerenderPath = (entry: string) => {
if (prerenderPaths?.has(entry)) {
console.warn(
`Warning: duplicate entry returned in getStaticPaths of \`${page}\` \`${entry}\``
)
}
prerenderPaths?.add(entry)
}

const _routeRegex = getRouteRegex(page)
const _routeMatcher = getRouteMatcher(_routeRegex)

Expand All @@ -564,7 +555,7 @@ export async function isPageStatic(
)
}

addPrerenderPath(entry)
prerenderPaths?.add(entry)
}
// For the object-provided path, we must make sure it specifies all
// required keys.
Expand Down Expand Up @@ -607,7 +598,7 @@ export async function isPageStatic(
)
})

addPrerenderPath(builtPage)
prerenderPaths?.add(builtPage)
}
})
}
Expand Down

0 comments on commit e587ce6

Please sign in to comment.