summaryrefslogtreecommitdiff
path: root/src/main/kotlin/io/dico/parcels2/command/ParcelCommandBuilder.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/io/dico/parcels2/command/ParcelCommandBuilder.kt')
-rw-r--r--src/main/kotlin/io/dico/parcels2/command/ParcelCommandBuilder.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/kotlin/io/dico/parcels2/command/ParcelCommandBuilder.kt b/src/main/kotlin/io/dico/parcels2/command/ParcelCommandBuilder.kt
index 891988c..6a604c3 100644
--- a/src/main/kotlin/io/dico/parcels2/command/ParcelCommandBuilder.kt
+++ b/src/main/kotlin/io/dico/parcels2/command/ParcelCommandBuilder.kt
@@ -88,7 +88,7 @@ private fun generateCommands(address: ICommandAddress, vararg names: String) {
while (addresses.isNotEmpty()) {
val cur = addresses.poll()
- addresses.addAll(cur.children.values.distinct())
+ cur.childrenMainKeys.mapTo(addresses) { cur.getChild(it) }
if (cur.hasCommand()) {
ReflectiveRegistration.generateCommands(cur, names)
}