[orx-noise] Random.pick returns back an empty list (#150)
This commit is contained in:
@@ -86,6 +86,8 @@ object Random {
|
|||||||
var list = coll.toMutableList()
|
var list = coll.toMutableList()
|
||||||
val picked = mutableListOf<T>()
|
val picked = mutableListOf<T>()
|
||||||
|
|
||||||
|
if (coll.isEmpty()) return list
|
||||||
|
|
||||||
while (picked.size < count) {
|
while (picked.size < count) {
|
||||||
if (list.isEmpty()) {
|
if (list.isEmpty()) {
|
||||||
list = coll.toMutableList()
|
list = coll.toMutableList()
|
||||||
|
|||||||
Reference in New Issue
Block a user