You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2019/11/05 18:18:39 UTC

[airflow-site] branch aip-11 updated: Improve random selection of array elements to fix header animations (#119)

This is an automated email from the ASF dual-hosted git repository.

kamilbregula pushed a commit to branch aip-11
in repository https://gitbox.apache.org/repos/asf/airflow-site.git


The following commit(s) were added to refs/heads/aip-11 by this push:
     new 25ffe88  Improve random selection of array elements to fix header animations (#119)
25ffe88 is described below

commit 25ffe8859c40b8515682b09c729fbf8dcadffca9
Author: Kamil Gabryjelski <ka...@gmail.com>
AuthorDate: Tue Nov 5 17:58:17 2019 +0100

    Improve random selection of array elements to fix header animations (#119)
---
 landing-pages/src/js/headerAnimation.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/landing-pages/src/js/headerAnimation.js b/landing-pages/src/js/headerAnimation.js
index 3f4f56c..3829801 100644
--- a/landing-pages/src/js/headerAnimation.js
+++ b/landing-pages/src/js/headerAnimation.js
@@ -29,7 +29,7 @@ const DRAW_SAFE_AREA = false;
 
 const randomBetween = (from, to) => from + Math.random() * (to - from);
 const randomInt = (from, to) => Math.round(randomBetween(from, to));
-const randomItem = (arr) => arr[randomInt(0, arr.length)];
+const randomItem = (arr) => arr[randomInt(0, arr.length - 1)];
 
 class Polygon {
   constructor(pos, vectors) {