dfinity / motoko-base

The Motoko base library
Apache License 2.0
483 stars 99 forks source link

Array.chain(): Error "index out of bounds" #595

Open iclighthouse opened 1 year ago

iclighthouse commented 1 year ago

https://github.com/dfinity/motoko-base/blob/80ededb39954739b18b88fc0e5561264003cf9ab/src/Array.mo#L539 let element = subArray[inner];

subArray may be an array of length 0.