Skip to content

Commit 35658f1

Browse files
committed
clean auth
1 parent 16beec9 commit 35658f1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

apps/basket/src/hooks/auth.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ async function _resolveOwnerId(website: Website): Promise<string | null> {
6464

6565
const getOwnerId = cacheable(
6666
async (website: Website): Promise<string | null> => {
67-
return _resolveOwnerId(website);
67+
return await _resolveOwnerId(website);
6868
},
6969
{
7070
expireInSec: 300,
@@ -149,7 +149,9 @@ export function isValidOrigin(
149149
* @throws {Error} if the domain format is invalid.
150150
*/
151151
export function normalizeDomain(domain: string): string {
152-
if (!domain) return '';
152+
if (!domain) {
153+
return '';
154+
}
153155
let urlString = domain.toLowerCase().trim();
154156

155157
// Ensure there's a protocol for the URL constructor to work correctly.
@@ -327,7 +329,7 @@ const getWebsiteByIdCached = cacheable(
327329

328330
const getOwnerIdCached = cacheable(
329331
async (website: Website): Promise<string | null> => {
330-
return _resolveOwnerId(website);
332+
return await _resolveOwnerId(website);
331333
},
332334
{
333335
expireInSec: 300,

0 commit comments

Comments
 (0)