From 06895e2a6d2d1faf06174b9a0398eff7a81c52e8 Mon Sep 17 00:00:00 2001 From: Him188 Date: Tue, 24 Nov 2020 10:15:38 +0800 Subject: [PATCH] Fix PluginDependency.parseFromString, close #224 --- .../mirai-console/src/plugin/description/PluginDependency.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) } }