Skip to content

Commit e838463

Browse files
refactor: use optional chaining
1 parent 227537e commit e838463

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/_helpers_/abstraction-classes/abstractContext.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export class AbstractContext {
4343
case 'cloudflare':
4444
case 'fastly':
4545
case 'vercel':
46-
if (this.ctx && this.ctx.waitUntil) {
46+
if (this.ctx?.waitUntil) {
4747
return this.ctx.waitUntil(promise);
4848
}
4949
break;
@@ -56,7 +56,7 @@ export class AbstractContext {
5656
break;
5757
case 'akamai':
5858
// Custom handling for Akamai EdgeWorkers
59-
if (this.ctx && this.ctx.wait) {
59+
if (this.ctx?.wait) {
6060
return this.ctx.wait(promise);
6161
}
6262
break;

0 commit comments

Comments
 (0)