File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
packages/payload-authjs/src/payload Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ interface Options<TSlug extends CollectionSlug> {
22
22
export const getPayloadUser = async < TSlug extends CollectionSlug = "users" > ( {
23
23
serverUrl = process . env . NEXT_PUBLIC_SERVER_URL ,
24
24
userCollectionSlug = "users" as TSlug ,
25
- } : Options < TSlug > = { } ) : Promise < DataFromCollectionSlug < TSlug > | null > => {
25
+ } : Options < TSlug > = { } ) : Promise < DataFromCollectionSlug < TSlug > | undefined > => {
26
26
const requestCookies = await cookies ( ) ;
27
27
28
28
if ( serverUrl === undefined ) {
@@ -40,7 +40,7 @@ export const getPayloadUser = async <TSlug extends CollectionSlug = "users">({
40
40
const { user } : { user : DataFromCollectionSlug < TSlug > } = await meUserReq . json ( ) ;
41
41
42
42
if ( ! meUserReq . ok || ! user ) {
43
- return null ;
43
+ return undefined ;
44
44
}
45
45
46
46
return user ;
You can’t perform that action at this time.
0 commit comments