Fix PluginDependency.parseFromString, close #224

This commit is contained in:
Him188 2020-11-24 10:15:38 +08:00
parent 5778b7c8d5
commit 06895e2a6d

View File

@ -81,7 +81,7 @@ public data class PluginDependency @JvmOverloads constructor(
val (id, version) = string.removeSuffix("?").let {
it.substringBeforeLast(':') to it.substringAfterLast(':', "")
}
return PluginDependency(id, version, optional)
return PluginDependency(id, version.takeIf(String::isNotBlank), optional)
}
}