Skip to content
This repository was archived by the owner on Sep 2, 2022. It is now read-only.

Commit 39bfbc1

Browse files
committed
Don't unnecessarily initialize statusCode to null in Next middleware
1 parent 6e1b953 commit 39bfbc1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/next/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const withApilytics = <T>(
3434
req: NextApiRequest,
3535
res: NextApiResponse<T>,
3636
): Promise<void> => {
37-
let statusCode = null;
37+
let statusCode: number | undefined;
3838
const timer = milliSecondTimer();
3939

4040
try {

0 commit comments

Comments
 (0)