Skip to content
This repository was archived by the owner on Mar 1, 2023. It is now read-only.

Commit c55a74a

Browse files
committed
resource_gcore_loadbalancer.go fixed
1 parent 39f16e7 commit c55a74a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gcore/resource_gcore_loadbalancer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,8 @@ func resourceLoadBalancerRead(ctx context.Context, d *schema.ResourceData, m int
275275
}
276276

277277
for _, cl := range currentListeners {
278-
currentL := cl.(map[string]interface{})
279-
if currentL != nil {
278+
currentL, ok := cl.(map[string]interface{})
279+
if currentL != nil && ok {
280280
if currentL["name"].(string) == listener.Name {
281281
currentL["id"] = listener.ID
282282
newListeners[i] = currentL

0 commit comments

Comments
 (0)