Fixed getStringsOrNull

This commit is contained in:
Auxilor
2022-10-01 13:11:42 +01:00
parent 1a3d035f78
commit 25b6a15c9c

View File

@@ -154,7 +154,9 @@ open class EcoConfig(
format: Boolean,
option: StringUtils.FormatOption
): List<String>? {
val strings = (get(path) as? Iterable<*>)?.map { it.toString() }?.toMutableList() ?: return null
val strings = (get(path) as? Iterable<*>)
?.map { it?.toString() ?: "" }
?.toMutableList() ?: return null
if (placeholderInjections.isNotEmpty() && format && option == StringUtils.FormatOption.WITH_PLACEHOLDERS) {
strings.replaceAll {
var string = it