feat: add internal role manager plugin; add role buttons plugin

This commit is contained in:
Dragory 2022-04-23 16:31:41 +03:00
parent 9314d57645
commit 3fe71b3e27
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
23 changed files with 732 additions and 1 deletions

View file

@ -876,7 +876,7 @@ export function chunkArray<T>(arr: T[], chunkSize): T[][] {
for (let i = 0; i < arr.length; i++) {
currentChunk.push(arr[i]);
if ((i !== 0 && i % chunkSize === 0) || i === arr.length - 1) {
if ((i !== 0 && (i + 1) % chunkSize === 0) || i === arr.length - 1) {
chunks.push(currentChunk);
currentChunk = [];
}