Skip to content

Commit

Permalink
data: Fix web not showing
Browse files Browse the repository at this point in the history
  • Loading branch information
Omico committed Jun 9, 2024
1 parent d132d7a commit f5ffdb3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import kotlinx.browser.localStorage
internal actual class MarkedAchievementsDataStore {
actual suspend fun load(): WwmMarkedAchievementIds {
val achievements = localStorage.getItem(ACHIEVEMENTS_KEY) ?: return emptySet()
return achievements.split(",").map(String::toInt).toSet()
return achievements.split(",").mapNotNull(String::toIntOrNull).toSet()
}

actual suspend fun save(ids: WwmMarkedAchievementIds): Unit =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import kotlinx.browser.localStorage
internal actual class MarkedAchievementsDataStore {
actual suspend fun load(): WwmMarkedAchievementIds {
val achievements = localStorage.getItem(ACHIEVEMENTS_KEY) ?: return emptySet()
return achievements.split(",").map(String::toInt).toSet()
return achievements.split(",").mapNotNull(String::toIntOrNull).toSet()
}

actual suspend fun save(ids: WwmMarkedAchievementIds): Unit =
Expand Down

0 comments on commit f5ffdb3

Please sign in to comment.