Skip to content
Snippets Groups Projects
Commit 6fbcc1ae authored by Rhys Arkins's avatar Rhys Arkins
Browse files

fix: check for empty packageRules before applying

parent e7ef20d3
No related branches found
No related tags found
No related merge requests found
...@@ -10,11 +10,12 @@ module.exports = { ...@@ -10,11 +10,12 @@ module.exports = {
function applyPackageRules(inputConfig) { function applyPackageRules(inputConfig) {
let config = { ...inputConfig }; let config = { ...inputConfig };
const { packageFile, depType, depName, currentVersion } = config; const { packageFile, depType, depName, currentVersion } = config;
const packageRules = config.packageRules || [];
logger.trace( logger.trace(
{ depName, packageRules: config.packageRules }, { depName, packageRules },
`Checking against ${config.packageRules.length} packageRules` `Checking against ${packageRules.length} packageRules`
); );
config.packageRules.forEach(packageRule => { packageRules.forEach(packageRule => {
let { let {
paths, paths,
depTypeList, depTypeList,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment