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

fix(jenkins): check doc.plugins is iterable

parent 6549cbdd
No related branches found
No related tags found
No related merge requests found
import is from '@sindresorhus/is';
import { load } from 'js-yaml';
import { JenkinsPluginsDatasource } from '../../datasource/jenkins-plugins';
import { logger } from '../../logger';
......@@ -55,7 +56,7 @@ function extractYaml(content: string): PackageDependency[] {
try {
const doc = load(content, { json: true }) as JenkinsPlugins;
if (doc?.plugins) {
if (is.nonEmptyArray(doc?.plugins)) {
for (const plugin of doc.plugins) {
if (plugin.artifactId) {
const dep = getDependency(plugin);
......
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