Skip to content

Commit 3fae340

Browse files
committed
fix: add conditional for newConfig.repositiories
1 parent 5d5aa08 commit 3fae340

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/server.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -410,13 +410,14 @@ module.exports = async function file(CoCreateConfig) {
410410

411411
newConfig.sources = sources
412412

413-
newConfig.repositories.forEach(obj => {
414-
for (const key in obj) {
415-
if (!["path", "repo", "exclude"].includes(key)) {
416-
delete obj[key];
413+
if (newConfig.repositories)
414+
newConfig.repositories.forEach(obj => {
415+
for (const key in obj) {
416+
if (!["path", "repo", "exclude"].includes(key)) {
417+
delete obj[key];
418+
}
417419
}
418-
}
419-
});
420+
});
420421

421422
delete newConfig.url
422423
delete newConfig.broadcast

0 commit comments

Comments
 (0)