Skip to content

Commit

Permalink
fix: set does not have find method (#4110)
Browse files Browse the repository at this point in the history
  • Loading branch information
KrzysztofMoch committed Aug 22, 2024
1 parent ca795f2 commit 7db7024
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/scripts/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ const handleMissingInformation = async ({github, context, labels}) => {
label.startsWith('missing-'),
);

const outdatedVersionLabel = labels.find((label) =>
const outdatedVersionLabel = Array.from(labels).find((label) =>
label.startsWith('outdated-version'),
);

Expand Down Expand Up @@ -220,7 +220,9 @@ const updateLabelsForMissingInfo = (labels) => {
labels.add('Repro Provided');
}

if (labels.find((label) => label.startsWith('outdated-version'))) {
if (
Array.from(labels).find((label) => label.startsWith('outdated-version'))
) {
labels.add('Newer Version Available');
} else {
labels.delete('Newer Version Available');
Expand Down

0 comments on commit 7db7024

Please sign in to comment.