aboutsummaryrefslogtreecommitdiff
path: root/src/Update
diff options
context:
space:
mode:
Diffstat (limited to 'src/Update')
-rw-r--r--src/Update/Update.elm6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Update/Update.elm b/src/Update/Update.elm
index c6c5f32..2cb45cb 100644
--- a/src/Update/Update.elm
+++ b/src/Update/Update.elm
@@ -76,7 +76,11 @@ update action model =
Nothing ->
{ model | timers <- Dict.update id (Maybe.map (updateTimer action)) model.timers }
RemoveTimer id ->
- { model | timers <- Dict.remove id model.timers }
+ if numberOfTimers model > 1
+ then
+ { model | timers <- Dict.remove id model.timers }
+ else
+ model
EditTimer id ->
{ model
| timerEdition <- Just (newTimerEdition id)