[Gradle, JS] Contains to in

#KT-37207 fixed
This commit is contained in:
Ilya Goncharov
2020-03-26 16:36:41 +03:00
parent 201d140912
commit a83f2faf9f
@@ -40,8 +40,8 @@ internal class YarnEntryRegistry(private val lockFile: File) {
private fun String.correctDependencyKey(): String =
when {
contains(GITHUB_VERSION_PREFIX) -> replace(GITHUB_VERSION_PREFIX, "@")
contains(FILE_VERSION_PREFIX) -> {
GITHUB_VERSION_PREFIX in this -> replace(GITHUB_VERSION_PREFIX, "@")
FILE_VERSION_PREFIX in this -> {
val location = substringAfter(FILE_VERSION_PREFIX)
val path = lockFile
.parentFile