Skip to content

Commit

Permalink
feat: add fallback value for default country setting
Browse files Browse the repository at this point in the history
  • Loading branch information
migalmoreno committed Dec 29, 2024
1 parent 546300e commit a65823d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/frontend/tubo/settings/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
countries (:supported-countries service)]
[:<>
[select-input "Default country" nil
(:name (get default-country service-id)) (map :name countries)
(or (:name (get default-country service-id)) (first countries))
(map :name countries)
(fn [e]
(rf/dispatch [:settings/change [:default-country service-id]
(first (filter #(= (.. e -target -value) (:name %))
Expand Down

0 comments on commit a65823d

Please sign in to comment.