Skip to content

Commit

Permalink
Add nil check to fix panic in storage bucket. (#2525)
Browse files Browse the repository at this point in the history
  • Loading branch information
modular-magician authored and nat-henderson committed Dec 21, 2018
1 parent e74ccfd commit 210141a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion google/resource_storage_bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ func resourceStorageBucketUpdate(d *schema.ResourceData, meta interface{}) error

// Setting fields to "" to be explicit that the PATCH call will
// delete this field.
if len(websites) == 0 {
if len(websites) == 0 || websites[0] == nil {
sb.Website.NotFoundPage = ""
sb.Website.MainPageSuffix = ""
} else {
Expand Down

0 comments on commit 210141a

Please sign in to comment.