From cd4ff2be15797d8e2bb10faa8be69baeb9d49e90 Mon Sep 17 00:00:00 2001 From: Bryan Date: Sun, 20 Dec 2020 14:31:50 -0600 Subject: [PATCH] fixes --- script.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/script.js b/script.js index b22df8b..56d31f7 100644 --- a/script.js +++ b/script.js @@ -24,9 +24,10 @@ const unlockDoor = (e, dID, aK, d) => { fetch(`${unlockUrl}?deviceID=${dID}&apiKey=${aK}&delay=${d}`) .then(response => response.json()) - .then(data => () { + .then(data => { setTimeout(function() { messageContainer.innerHTML = "" }, 3000); messageContainer.innerHTML = data.message; + return; }) .catch(error => messageContainer.innerHTML = `Error: ${error}`) }