From 16644f57327523d94c7a1b04780612f583ed4e5d Mon Sep 17 00:00:00 2001 From: Eric Batlle Date: Sat, 30 Jan 2021 18:13:41 +0100 Subject: [PATCH] Clean createThing button events to avoid calling it when user signsOut --- public/app.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/public/app.js b/public/app.js index 6b620e1..53c4a45 100644 --- a/public/app.js +++ b/public/app.js @@ -88,6 +88,8 @@ auth.onAuthStateChanged(user => { } else { // Unsubscribe when the user signs out unsubscribe && unsubscribe(); + // Clean createThing button onClick events to avoid calling it when user signsOut + createThing.onClick = null; } });