Forráskód Böngészése

Fix error where it would access non-existent property

sbkwgh 8 éve
szülő
commit
35a9af7252
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      src/assets/js/errorHandler.js

+ 1 - 1
src/assets/js/errorHandler.js

@@ -2,7 +2,7 @@ module.exports = function(vuex) {
 	return function (res, ignoreParamErrorCb) {
 		let errors = []
 
-		if(res.response === undefined) {
+		if(res.response === undefined || res.response.data.errors === undefined) {
 			errors.push('An error occured. Try again later')
 		} else {
 			res.response.data.errors.forEach(error => {