removed panic

This commit is contained in:
Josh Baker 2016-12-31 09:39:39 -07:00
parent b9e61777e6
commit 738f7eb43c
1 changed files with 3 additions and 3 deletions

View File

@ -172,9 +172,9 @@ func (c *Collection) ReplaceOrInsert(id string, obj geojson.Object, fields []str
c.weight += len(newFields) * 8
}
} else {
if len(fields) == 0 {
panic("if fields is empty, make it nil")
}
//if len(fields) == 0 {
// panic("if fields is empty, make it nil")
//}
// map field name to value
for i, field := range fields {
c.setField(newItem, field, values[i])