Skip to content

Commit

Permalink
providers/heroku: empty config vars block shouldn't panic [GH-1211]
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellh committed Mar 26, 2015
1 parent 19c7f8c commit e5a375a
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions builtin/providers/heroku/resource_heroku_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,14 +358,18 @@ func updateConfigVars(
vars := make(map[string]*string)

for _, v := range o {
for k, _ := range v.(map[string]interface{}) {
vars[k] = nil
if v != nil {
for k, _ := range v.(map[string]interface{}) {
vars[k] = nil
}
}
}
for _, v := range n {
for k, v := range v.(map[string]interface{}) {
val := v.(string)
vars[k] = &val
if v != nil {
for k, v := range v.(map[string]interface{}) {
val := v.(string)
vars[k] = &val
}
}
}

Expand Down

0 comments on commit e5a375a

Please sign in to comment.