mirror of https://github.com/tidwall/tile38.git
removed panic
This commit is contained in:
parent
b9e61777e6
commit
738f7eb43c
|
@ -172,9 +172,9 @@ func (c *Collection) ReplaceOrInsert(id string, obj geojson.Object, fields []str
|
||||||
c.weight += len(newFields) * 8
|
c.weight += len(newFields) * 8
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if len(fields) == 0 {
|
//if len(fields) == 0 {
|
||||||
panic("if fields is empty, make it nil")
|
// panic("if fields is empty, make it nil")
|
||||||
}
|
//}
|
||||||
// map field name to value
|
// map field name to value
|
||||||
for i, field := range fields {
|
for i, field := range fields {
|
||||||
c.setField(newItem, field, values[i])
|
c.setField(newItem, field, values[i])
|
||||||
|
|
Loading…
Reference in New Issue