From 98a703115bbd01ffc7d11ebf1f82935b995b2aa9 Mon Sep 17 00:00:00 2001 From: Mila Votradovec Date: Fri, 31 Jan 2020 09:45:05 +0100 Subject: [PATCH] fix: correct object path to mvn and java version Optional chaining operator was forgotten in new analytics path in lodash.get. --- src/lib/snyk-test/run-test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/snyk-test/run-test.ts b/src/lib/snyk-test/run-test.ts index 1ad119d940..ac7263e081 100644 --- a/src/lib/snyk-test/run-test.ts +++ b/src/lib/snyk-test/run-test.ts @@ -301,12 +301,12 @@ async function assembleLocalPayloads( analytics.add('pluginName', deps.plugin.name); const javaVersion = _.get( deps.plugin, - 'meta?.versionBuildInfo?.metaBuildVersion.javaVersion', + 'meta.versionBuildInfo.metaBuildVersion.javaVersion', null, ); const mvnVersion = _.get( deps.plugin, - 'meta?.versionBuildInfo?.metaBuildVersion.mvnVersion', + 'meta.versionBuildInfo.metaBuildVersion.mvnVersion', null, ); if (javaVersion) {