remove a bad dev warning from static-build (#2733)
This commit is contained in:
parent
d08ddaf5b9
commit
6bf124fb2f
2 changed files with 9 additions and 1 deletions
5
.changeset/silver-foxes-bathe.md
Normal file
5
.changeset/silver-foxes-bathe.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Remove a bad dev warning
|
|
@ -28,8 +28,11 @@ async function getParamsAndProps(opts: GetParamsAndPropsOptions): Promise<[Param
|
|||
}
|
||||
}
|
||||
let routeCacheEntry = routeCache.get(route);
|
||||
// During build, the route cache should already be populated.
|
||||
// During development, the route cache is filled on-demand and may be empty.
|
||||
// TODO(fks): Can we refactor getParamsAndProps() to receive routeCacheEntry
|
||||
// as a prop, and not do a live lookup/populate inside this lower function call.
|
||||
if (!routeCacheEntry) {
|
||||
warn(logging, 'routeCache', `Internal Warning: getStaticPaths() called twice during the build. (${route.component})`);
|
||||
routeCacheEntry = await callGetStaticPaths(mod, route, true, logging);
|
||||
routeCache.set(route, routeCacheEntry);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue