about summary refs log tree commit diff
path: root/website/sandbox/learnpianochords/src/State.elm
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-04-18T23·31+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-04-18T23·31+0100
commit74ebb8e86997bffe98d4b062028d1b25740725ff (patch)
tree5ae619141a1319ab635bb94f86b7ce50fc089020 /website/sandbox/learnpianochords/src/State.elm
parent8620d86fd00d78e3f67de2a7662a881edf37394c (diff)
Set the selectedChord to Nothing when setting a key
This helps us avoid showing a chord from a key that the user did not whitelist.
Diffstat (limited to 'website/sandbox/learnpianochords/src/State.elm')
-rw-r--r--website/sandbox/learnpianochords/src/State.elm1
1 files changed, 1 insertions, 0 deletions
diff --git a/website/sandbox/learnpianochords/src/State.elm b/website/sandbox/learnpianochords/src/State.elm
index cce3c34eb38e..5f6a02a92085 100644
--- a/website/sandbox/learnpianochords/src/State.elm
+++ b/website/sandbox/learnpianochords/src/State.elm
@@ -234,6 +234,7 @@ update msg model =
                 | whitelistedKeys = keys
                 , whitelistedChords =
                     keys |> List.concatMap Theory.chordsForKey
+                , selectedChord = Nothing
               }
             , Cmd.none
             )