laravel-request 1.1.11 → 1.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/Api.js +2 -3
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "laravel-request",
3
3
  "productName": "laravel-request",
4
- "version": "1.1.11",
4
+ "version": "1.1.12",
5
5
  "description": "laravel-request",
6
6
  "main": "src/index.js",
7
7
  "scripts": {},
package/src/Api.js CHANGED
@@ -226,12 +226,11 @@ export default class Api {
226
226
  console.log(errorJson)
227
227
  }
228
228
 
229
-
230
229
  // status code
231
- const statusCode = e.response.status;
230
+ const statusCode = e.response?.status;
232
231
 
233
232
  // status text
234
- const statusText = e.response.statusText;
233
+ const statusText = e.response?.statusText;
235
234
 
236
235
  try {
237
236
  error(xhr, statusCode, statusText);