Check includes property

This commit is contained in:
HaveAGitGat 2023-05-08 14:35:36 +01:00
parent 5a47a13501
commit c00dfa7d9e
2 changed files with 45 additions and 5 deletions

View file

@ -74,12 +74,16 @@ const plugin = (file, librarySettings, inputs, otherArguments) => {
let fileContainsProperty = false;
try {
try {
if (propertyValues.includes(file[propertyName])) {
fileContainsProperty = true;
for (let i = 0; i < propertyValues.length; i += 1) {
try {
if (file[propertyName].includes(propertyValues[i])) {
fileContainsProperty = true;
break;
}
} catch (err) {
// eslint-disable-next-line no-console
console.log(err);
}
} catch (err) {
// err
}
const message = `File property ${propertyName} of ${file[propertyName]}`