From 320dc7290c836dcb310061e5289865ebf59b5528 Mon Sep 17 00:00:00 2001 From: Thomas Wade Date: Sat, 6 Oct 2018 21:29:32 +0930 Subject: [PATCH] Don't update while cooling down --- scripts/app.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/app.js b/scripts/app.js index fbca851..c650e93 100644 --- a/scripts/app.js +++ b/scripts/app.js @@ -22,6 +22,9 @@ app.controller("mates", ["$scope", "$http", "$interval", function($scope, $http, $scope.countClick = () => { + // Don't bother updating during a cooldown + if ($scope.cooldown) return; + $http.post("/mates") .then((r) => {