Skip to content

Commit 5c67ec5

Browse files
committed
fix: ensure match is an array by wrapping non-array values
1 parent eb47cf0 commit 5c67ec5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/server.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,11 @@ module.exports = async function file(CoCreateConfig, configPath, match) {
8888
let sources = CoCreateConfig.sources;
8989
let configDirectoryPath = path.dirname(configPath);
9090

91-
if (match && !Array.isArray(match)) match = [path.dirname(match)];
92-
else if (!match) match = [];
91+
if (match && !Array.isArray(match)) {
92+
match = [match];
93+
} else if (!match) {
94+
match = [];
95+
}
9396

9497
let config = await Config(
9598
{

0 commit comments

Comments
 (0)