Commit 6c91ffcf authored by obscuren's avatar obscuren

Do not panic, but return nil instead

parent 15e0093e
......@@ -176,7 +176,7 @@ func (val *Value) Get(idx int) *Value {
}
if idx < 0 {
panic("negative idx for Value Get")
return NewValue(nil)
}
return NewValue(d[idx])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment