KT-34468 Yarn. Dependency search key calculated once

This commit is contained in:
Victor Turansky
2020-03-23 20:38:51 +03:00
committed by Ilya Goncharov
parent 0d1bf66c2a
commit 6931b37a79
@@ -117,8 +117,9 @@ abstract class YarnBasics : NpmApi {
val deps = if (src.version != "*") {
byKey[key]
} else {
val searchKey = dependencyKey(src.key, "")
byKey.entries
.firstOrNull { it.key.startsWith(dependencyKey(src.key, "")) }
.firstOrNull { it.key.startsWith(searchKey) }
?.value
}