Skip to content

Commit

Permalink
Throw exception is uid null
Browse files Browse the repository at this point in the history
  • Loading branch information
hello-binit committed Oct 24, 2024
1 parent 66ac196 commit bdc478f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/home/tsx/login_handler/FirebaseLoginHandler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit bdc478f

Please sign in to comment.