Check db url before attempting to get a user id.
This commit is contained in:
parent
09e82600aa
commit
b38fdf49ad
|
@ -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));
|
||||||
|
};
|
||||||
|
|
Loading…
Reference in New Issue