Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

Commit

Permalink
wrap verification with nil check to avoid exception (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkappa authored Nov 7, 2018
1 parent 94c35de commit 31bf0e2
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions auth0/resource_auth0_custom_domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,13 @@ func readCustomDomain(d *schema.ResourceData, m interface{}) error {
d.Set("type", c.Type)
d.Set("primary", c.Primary)
d.Set("status", c.Status)
d.Set("verification", []map[string]interface{}{
{"methods": c.Verification.Methods},
})

if c.Verification != nil {
d.Set("verification", []map[string]interface{}{
{"methods": c.Verification.Methods},
})
}

return nil
}

Expand Down

0 comments on commit 31bf0e2

Please sign in to comment.