Browse Source

Don't show alert if no errors

sbkwgh 8 years ago
parent
commit
a06192a73e
1 changed files with 5 additions and 2 deletions
  1. 5 2
      src/assets/js/errorHandler.js

+ 5 - 2
src/assets/js/errorHandler.js

@@ -16,7 +16,10 @@ module.exports = function(vuex) {
 			})
 		}
 
-		vuex.commit('setAjaxErrors', errors)
-		vuex.commit('setAjaxErrorsModalState', true)
+		if(errors.length) {
+			vuex.commit('setAjaxErrors', errors)
+			vuex.commit('setAjaxErrorsModalState', true)
+		}
+
 	}
 }