Fixed panic when typed array is empty
All checks were successful
Build / build (push) Successful in 1m40s
All checks were successful
Build / build (push) Successful in 1m40s
This commit is contained in:
parent
dac0a59085
commit
4a527cfe3d
|
@ -89,7 +89,7 @@ func (r *REPL) displayResult(ctx context.Context, w io.Writer, res any, concise
|
|||
fmt.Fprintf(w, "]")
|
||||
} else {
|
||||
// In the off-chance that this is actually a slice of printables
|
||||
vt := reflect.SliceOf(reflect.TypeOf(v[0]))
|
||||
vt := reflect.ValueOf(res).Type()
|
||||
if tp, ok := r.typePrinters[vt]; ok {
|
||||
canDisplay := true
|
||||
|
||||
|
|
Loading…
Reference in a new issue