mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-10 18:40:15 +08:00
Fix PluginDependency.parseFromString, close #224
This commit is contained in:
parent
5778b7c8d5
commit
06895e2a6d
@ -81,7 +81,7 @@ public data class PluginDependency @JvmOverloads constructor(
|
|||||||
val (id, version) = string.removeSuffix("?").let {
|
val (id, version) = string.removeSuffix("?").let {
|
||||||
it.substringBeforeLast(':') to it.substringAfterLast(':', "")
|
it.substringBeforeLast(':') to it.substringAfterLast(':', "")
|
||||||
}
|
}
|
||||||
return PluginDependency(id, version, optional)
|
return PluginDependency(id, version.takeIf(String::isNotBlank), optional)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user