Format draw()

This commit is contained in:
Dev 2024-02-20 09:12:16 +00:00
parent 0bf2cf38fe
commit 2e8cb81016

View File

@ -136,7 +136,10 @@ export class ProbabilityObjectArray<K, V = undefined> extends Array<ProbabilityO
*/
public draw(count = 1, replacement = true, locklist: Array<K> = []): K[]
{
if (this.length === 0) return [];
if (this.length === 0)
{
return [];
}
const { probArray, keyArray } = this.reduce((acc, x) =>
{