Skip to content

Commit

Permalink
Fix nil binding map bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mkchoi212 committed May 31, 2018
1 parent 96ca3ec commit 02bd481
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions key/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ func LoadSettings() (b Binding, err error) {

// parseSettings looks for `$HOME/.fac.yml` and parses it into a `Binding` value
// If the file does not exist, it returns the `defaultBinding`
func parseSettings() (b Binding) {
func parseSettings() Binding {
b := make(Binding)

usr, err := currentUser()
if err != nil {
fmt.Println(color.Yellow(color.Regular, "fac: %s. Default key-bindings will be used", err.Error()))
Expand All @@ -105,7 +107,7 @@ func parseSettings() (b Binding) {
return defaultBinding
}

return
return b
}

// consolidate takes the user's key-binding settings and fills the missings key-binds
Expand Down

0 comments on commit 02bd481

Please sign in to comment.