aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Renard 2019-09-27 01:31:19 -0300
committerLibravatar Renard 2019-09-27 01:31:19 -0300
commit020a8f14632db1a62d0bd1ed955ddedf854ffb39 (patch)
tree1b8aa43c527aa2e9cc5d997888ae5c6830ddea78
parent19475ccfbb748a05c5bb1fb1b1ddd4c50705b48b (diff)
downloadbai-client-020a8f14632db1a62d0bd1ed955ddedf854ffb39.tar.gz
bai-client-020a8f14632db1a62d0bd1ed955ddedf854ffb39.tar.xz
bai-client-020a8f14632db1a62d0bd1ed955ddedf854ffb39.zip
Fix: undefined avatars
-rw-r--r--src/Post.js4
1 files changed, 2 insertions, 2 deletions
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);
}