From 4b3caa47fac5e6f41708b89713582651822dae32 Mon Sep 17 00:00:00 2001 From: Empa <42304516+ItsEmpa@users.noreply.github.com> Date: Wed, 12 Jun 2024 16:08:29 +0200 Subject: Fix: Anniversary Custom Scoreboard (#2058) Co-authored-by: J10a1n15 <45315647+j10a1n15@users.noreply.github.com> --- src/main/java/at/hannibal2/skyhanni/utils/CollectionUtils.kt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/main/java/at/hannibal2/skyhanni/utils') diff --git a/src/main/java/at/hannibal2/skyhanni/utils/CollectionUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/CollectionUtils.kt index 6b4d70046..87261b6d0 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/CollectionUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/CollectionUtils.kt @@ -133,6 +133,9 @@ object CollectionUtils { return newList } + /** + * This does not work inside a [buildList] block + */ fun List.addIfNotNull(element: String?) = element?.let { plus(it) } ?: this fun Map.editCopy(function: MutableMap.() -> Unit) = -- cgit