Skip to content

Commit 3ef47a5

Browse files
author
Sergey Khomushin
committed
EmailJSResponseStatus: replace optional chaining
1 parent f87a2f5 commit 3ef47a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/models/EmailJSResponseStatus.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export class EmailJSResponseStatus {
33
public text: string;
44

55
constructor(httpResponse: XMLHttpRequest | null) {
6-
this.status = httpResponse?.status || 0;
7-
this.text = httpResponse?.responseText || 'Network Error';
6+
this.status = httpResponse ? httpResponse.status : 0;
7+
this.text = httpResponse ? httpResponse.responseText : 'Network Error';
88
}
99
}

0 commit comments

Comments
 (0)