From bdc478f7b9e877f8467cd63eaac65ac91a82df45 Mon Sep 17 00:00:00 2001 From: Binit Shah Date: Thu, 24 Oct 2024 12:35:05 -0400 Subject: [PATCH] Throw exception is uid null --- src/pages/home/tsx/login_handler/FirebaseLoginHandler.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/home/tsx/login_handler/FirebaseLoginHandler.tsx b/src/pages/home/tsx/login_handler/FirebaseLoginHandler.tsx index c341a39..2b683b6 100644 --- a/src/pages/home/tsx/login_handler/FirebaseLoginHandler.tsx +++ b/src/pages/home/tsx/login_handler/FirebaseLoginHandler.tsx @@ -30,7 +30,7 @@ export class FirebaseLoginHandler extends LoginHandler { public listRooms(resultCallback) { if (this.uid === undefined) { - return; // TODO(binit): throw an exception? reject a promise? + throw new Error("FirebaseLoginHandler.listRooms(): this.uid is null"); } onValue(ref(this.db, 'rooms/' + this.uid + '/robots'), (snapshot) => {