We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36c68a2 commit a7e99d7Copy full SHA for a7e99d7
src/models/EmailJSResponseStatus.ts
@@ -2,8 +2,8 @@ export class EmailJSResponseStatus {
2
public status: number;
3
public text: string;
4
5
- constructor(httpResponse: XMLHttpRequest) {
6
- this.status = httpResponse.status;
7
- this.text = httpResponse.responseText;
+ constructor(httpResponse: XMLHttpRequest | null) {
+ this.status = httpResponse?.status || 0;
+ this.text = httpResponse?.responseText || 'network error';
8
}
9
0 commit comments