fix: set does not have find method (#4110)

This commit is contained in:
Krzysztof Moch 2024-08-22 11:22:11 +02:00 committed by GitHub
parent ca795f298a
commit 7db7024cb3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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'),
);
@ -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');