Skip to content

Commit 81f1e47

Browse files
committed
fix: add optional chaining to queryParams access_token check
1 parent 0f38329 commit 81f1e47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/meteor/app/oauth2-server-config/server/oauth/oauth2-server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ API.v1.addAuthMethod((routeContext) => {
7575
const authorization = routeContext.request.headers.get('authorization') ?? undefined;
7676
const query = isPlainObject(routeContext.queryParams) ? routeContext.queryParams : {};
7777
const accessToken = typeof query.access_token === 'string' ? query.access_token : undefined;
78-
if (routeContext.queryParams.access_token) {
78+
if (routeContext.queryParams?.access_token) {
7979
delete routeContext.queryParams.access_token;
8080
}
8181

0 commit comments

Comments
 (0)