Skip to content

Commit

Permalink
check len
Browse files Browse the repository at this point in the history
  • Loading branch information
DrFaust92 committed Jun 9, 2021
1 parent c234db1 commit 36ddac2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aws/resource_aws_glue_catalog_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ func expandGlueStorageDescriptor(l []interface{}) *glue.StorageDescriptor {
storageDescriptor.StoredAsSubDirectories = aws.Bool(v.(bool))
}

if v, ok := s["schema_reference"]; ok {
if v, ok := s["schema_reference"]; ok && len(v.([]interface{})) > 0 {
storageDescriptor.Columns = nil
storageDescriptor.SchemaReference = expandGlueTableSchemaReference(v.([]interface{}))
}
Expand Down

0 comments on commit 36ddac2

Please sign in to comment.