mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Check if matched before reading value (#4096)
This commit is contained in:
parent
2fa49d70b7
commit
9d4891f295
|
@ -13,7 +13,12 @@ export default class PagesManifestPlugin {
|
||||||
const pages = {}
|
const pages = {}
|
||||||
|
|
||||||
for (const entry of entries) {
|
for (const entry of entries) {
|
||||||
const pagePath = MATCH_ROUTE_NAME.exec(entry.name)[1]
|
const result = MATCH_ROUTE_NAME.exec(entry.name)
|
||||||
|
if (!result) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
const pagePath = result[1]
|
||||||
|
|
||||||
if (!pagePath) {
|
if (!pagePath) {
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in a new issue