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.
- package/package.json +1 -1
- package/src/Api.js +2 -3
package/package.json
CHANGED
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
|
|
230
|
+
const statusCode = e.response?.status;
|
|
232
231
|
|
|
233
232
|
// status text
|
|
234
|
-
const statusText = e.response
|
|
233
|
+
const statusText = e.response?.statusText;
|
|
235
234
|
|
|
236
235
|
try {
|
|
237
236
|
error(xhr, statusCode, statusText);
|