When using Search(), loadDocument is called where it loads fields and values through type casting. However, it doesn't do a nil check before casting arr[idIdx+fieldsIdx] into a []interface{}. Under specific circumstances without a comma ok check, the library will panic with the error panic: interface conversion: interface {} is nil, not []interface {}. This PR adds a comma ok check before casting lst to []interface{}.
When using Search(), loadDocument is called where it loads fields and values through type casting. However, it doesn't do a nil check before casting
arr[idIdx+fieldsIdx]
into a[]interface{}
. Under specific circumstances without a comma ok check, the library will panic with the errorpanic: interface conversion: interface {} is nil, not []interface {}
. This PR adds a comma ok check before casting lst to[]interface{}
.