TootComposer: fix placeholder empty

This commit is contained in:
thislight 2024-09-28 22:46:28 +08:00
parent ae93725bf1
commit a1e28fe647

View file

@ -183,7 +183,8 @@ function randomChoose<T extends any[]>(
rn: number,
K: T,
): T extends Array<infer E> ? E : never {
const idx = Math.round(rn * K.length) - 1;
const idx = Math.floor(rn * K.length);
console.log(idx, K.length);
return K[idx];
}