diff --git a/cache/src/main/kotlin/org/openrs2/cache/NamedEntryCollection.kt b/cache/src/main/kotlin/org/openrs2/cache/NamedEntryCollection.kt index 834fe21968..88be188db2 100644 --- a/cache/src/main/kotlin/org/openrs2/cache/NamedEntryCollection.kt +++ b/cache/src/main/kotlin/org/openrs2/cache/NamedEntryCollection.kt @@ -251,9 +251,9 @@ public abstract class NamedEntryCollection( } val set = nameHashTable[newNameHash] - when { - set == null -> nameHashTable[newNameHash] = IntSortedSets.singleton(id) - set is IntSortedSets.Singleton -> { + when (set) { + null -> nameHashTable[newNameHash] = IntSortedSets.singleton(id) + is IntSortedSets.Singleton -> { val newSet = IntAVLTreeSet() newSet.add(set.firstInt()) newSet.add(id)