diff --git a/backend/mirai-console/src/plugin/description/PluginDependency.kt b/backend/mirai-console/src/plugin/description/PluginDependency.kt index ff53a02aa..82b319c50 100644 --- a/backend/mirai-console/src/plugin/description/PluginDependency.kt +++ b/backend/mirai-console/src/plugin/description/PluginDependency.kt @@ -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) } }