Skip to content

Commit

Permalink
refactor: replace ==/!= with ===/!== (#2935)
Browse files Browse the repository at this point in the history
Comparing to `null` without a type-checking operator (`===` or `!==`), can have unintended results as the comparison will evaluate to `true` when comparing to not just a `null`, but also an `undefined` value.

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
  • Loading branch information
deepsource-autofix[bot] committed May 23, 2023
1 parent 57d7045 commit 4e57cb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/web/src/lib/uploadToIPFS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const getS3Client = async (): Promise<S3> => {
client.middlewareStack.addRelativeTo(
(next: Function) => async (args: any) => {
const { response } = await next(args);
if (response.body == null) {
if (response.body === null) {
response.body = new Uint8Array();
}
return { response };
Expand Down

2 comments on commit 4e57cb7

@vercel
Copy link

@vercel vercel bot commented on 4e57cb7 May 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

web – ./apps/web

lenster.vercel.app
web-git-main-lenster.vercel.app
web-lenster.vercel.app
lenster.xyz

@vercel
Copy link

@vercel vercel bot commented on 4e57cb7 May 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

prerender – ./apps/prerender

prerender-lenster.vercel.app
prerender-git-main-lenster.vercel.app
prerender.lenster.xyz

Please sign in to comment.