From b58dd551e00217727c722b07b1a8213a9e698fd6 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Tue, 29 May 2018 10:27:03 -0700 Subject: [PATCH] Make loop.stop() actually stop --- src/utils/game-loop.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/game-loop.js b/src/utils/game-loop.js index 600f3d8..d5e33d1 100644 --- a/src/utils/game-loop.js +++ b/src/utils/game-loop.js @@ -20,7 +20,7 @@ export default class GameLoop { } stop() { - if (!this.loopID) { + if (this.loopID) { window.cancelAnimationFrame(this.loopID); this.loopID = null; }