Check db url before attempting to get a user id.
This commit is contained in:
1 parent
09e82600aa
commit
b38fdf49ad
1 file changed
+6
-2
+6
-2
@@ -32,5 +32,9 @@ export const parseDbUrl = (urlString: string) => {
|
|||||||
return { username: hex2a(encodedUser), database: urlString };
|
return { username: hex2a(encodedUser), database: urlString };
|
||||||
};
|
};
|
||||||
|
|
||||||
export const dbUrlToUserId = (urlString: string) =>
|
export const dbUrlToUserId = (urlString: string) => {
|
||||||
userId(parseDbUrl(urlString));
|
if (!urlString) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return userId(parseDbUrl(urlString));
|
||||||
|
};
|
||||||
Reference in new issue
Block a user