From 98f20cbcd679add54813d50daef6cceb5be62fe1 Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Mon, 22 Jan 2024 16:12:15 +0800 Subject: [PATCH] refactor(komga): remove unnecessary null checks --- .../komga/infrastructure/metadata/epub/EpubMetadataProvider.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/komga/src/main/kotlin/org/gotson/komga/infrastructure/metadata/epub/EpubMetadataProvider.kt b/komga/src/main/kotlin/org/gotson/komga/infrastructure/metadata/epub/EpubMetadataProvider.kt index e42935f1..0a7b93d5 100644 --- a/komga/src/main/kotlin/org/gotson/komga/infrastructure/metadata/epub/EpubMetadataProvider.kt +++ b/komga/src/main/kotlin/org/gotson/komga/infrastructure/metadata/epub/EpubMetadataProvider.kt @@ -103,7 +103,7 @@ class EpubMetadataProvider( val language = opf.selectFirst("metadata > dc|language")?.text()?.ifBlank { null } val genres = opf.select("metadata > dc|subject") - .mapNotNull { it?.text()?.trim()?.ifBlank { null } } + .mapNotNull { it.text().trim().ifBlank { null } } .toSet() .ifEmpty { null }