inflect number of socket errors
This commit is contained in:
parent
34f3148617
commit
57bfd7c766
1 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue