From efd828346739904eaa680c1df88676fbda0c904f Mon Sep 17 00:00:00 2001 From: Miodec Date: Mon, 1 Mar 2021 22:57:05 +0000 Subject: [PATCH] prettier verison of previous commit --- functions/index.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/functions/index.js b/functions/index.js index e9157c321..4acc3c020 100644 --- a/functions/index.js +++ b/functions/index.js @@ -866,11 +866,7 @@ function validateResult(result) { } } - let wpmbad = false; - result.wpm.forEach((w) => { - if (w > 400) wpmbad = true; - }); - if (wpmbad) return false; + if (result.wpm.filter((w) => w > 400).length > 0) return false; if (result.consistency < 25) return false;