sindresorhus / globby

User-friendly glob matching
MIT License
2.49k stars 126 forks source link

Error with generateGlobTasks #248

Closed nam-edi closed 1 year ago

nam-edi commented 1 year ago

Hello, I have an error with "generateGlobTasks".

Here is the code that causes the problem:

const options = {
            ...taskOptions,
            ignore: taskOptions.ignore.concat(ignore)
        };

Here is the error: TypeError: Cannot read properties of undefined (reading 'concat') The problem is solved if we replace it with:

const options = {
            ...taskOptions,
            ignore: (taskOptions.ignore || []).concat(ignore)
        };
sindresorhus commented 1 year ago

There's no such code in the latest globby version. Make sure you are on the latest version.