inflect number of socket errors

This commit is contained in:
Katelyn Perry 2014-10-31 09:59:49 -05:00
parent 34f3148617
commit 57bfd7c766

View file

@ -191,10 +191,15 @@ var subs = (function() {
} }
var notifyErrors = function() { var notifyErrors = function() {
var errorString;
if (errorQueue.length == 0) { if (errorQueue.length == 0) {
return; return;
} else if (errorQueue.length == 1) {
errorString = "error";
} else {
errorString = "errors";
} }
toastr.warning(errorQueue.length + " socket errors; check the server field above."); toastr.warning(errorQueue.length + " socket " + errorString + "; check the server field above.");
errorQueue.length = 0; errorQueue.length = 0;
} }