The weeb for the next gen discord boat - Wamellow wamellow.com
bot discord
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix `toFixedArrayLength` locking up on empty arrays

Luna 8978a073 4aba56ac

+3 -2
+3 -2
utils/fixed-array-length.ts
··· 1 1 export function toFixedArrayLength<T>(arr: T[], length: number): T[] { 2 - const originalLength = arr.length; 3 - const numCopies = Math.ceil(length / originalLength); 2 + if (!arr.length) return []; 3 + 4 + const numCopies = Math.ceil(length / arr.length); 4 5 const slicedArray: T[] = []; 5 6 6 7 for (let i = 0; i < numCopies; i++) {