浏览代码

Don't show alert if no errors

sbkwgh 8 年之前
父节点
当前提交
a06192a73e
共有 1 个文件被更改,包括 5 次插入2 次删除
  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)
+		}
+
 	}
 }