providers/heroku: empty config vars block shouldn't panic [GH-1211]

This commit is contained in:
Mitchell Hashimoto 2015-03-26 09:44:51 -07:00
parent 19c7f8cff4
commit e5a375ae58
1 changed files with 9 additions and 5 deletions

View File

@ -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
}
}
}