diff --git a/src/main/scala/io/shiftleft/js2cpg/cpg/passes/astcreation/AstNodeBuilder.scala b/src/main/scala/io/shiftleft/js2cpg/cpg/passes/astcreation/AstNodeBuilder.scala index 36272b9fc..ad16c865f 100644 --- a/src/main/scala/io/shiftleft/js2cpg/cpg/passes/astcreation/AstNodeBuilder.scala +++ b/src/main/scala/io/shiftleft/js2cpg/cpg/passes/astcreation/AstNodeBuilder.scala @@ -55,9 +55,9 @@ class AstNodeBuilder[NodeBuilderType](private val diffGraph: DiffGraph.Builder, def createDependencyNode(name: String, groupId: String, version: String): NewDependency = { val dependency = NewDependency() - .version(version) - .name(name) - .dependencyGroupId(Some(groupId)) + .name(Option(name).getOrElse("")) + .dependencyGroupId(Option(groupId).getOrElse("")) + .version(Option(version).getOrElse("")) .build diffGraph.addNode(dependency) dependency