From 020a8f14632db1a62d0bd1ed955ddedf854ffb39 Mon Sep 17 00:00:00 2001 From: Renard Date: Fri, 27 Sep 2019 01:31:19 -0300 Subject: Fix: undefined avatars --- src/Post.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Post.js') diff --git a/src/Post.js b/src/Post.js index 38eac8e..78be0b6 100644 --- a/src/Post.js +++ b/src/Post.js @@ -113,11 +113,11 @@ const Post = ({ index, post, locked, threadId, currentBoard, nightMode }) => { let rndAvatar, hue; if (user_id !== "") { - let i = Math.round(idRng() * avatars.length - 1); + let i = Math.round(idRng() * (avatars.length - 1)); rndAvatar = avatars[i]; hue = Math.round(idRng() * 360); } else { - let i = Math.round(rng() * avatars.length - 1); + let i = Math.round(rng() * (avatars.length - 1)); rndAvatar = avatars[i]; hue = Math.round(rng() * 360); } -- cgit v1.2.1-18-gbd029