Skip to content

Commit c00cd32

Browse files
committed
Add default empty array when filenames is undefined or null
1 parent 4a6e76c commit c00cd32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/files.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ async function generateFilesFromTemplate({ name, path, templatesPath }) {
8585
* @param {string} componentName
8686
* @return {object} with the correct filenames
8787
*/
88-
function getFileNames(fileNames, componentName) {
88+
function getFileNames(fileNames = [], componentName) {
8989
const defaultFileNames = {
9090
testFileName: `${defaultOptions.testFileName}.${componentName}`,
9191
componentFileName: componentName,

0 commit comments

Comments
 (0)