diff --git a/index.js b/index.js index 7fa792e..3594153 100644 --- a/index.js +++ b/index.js @@ -26,7 +26,7 @@ function onready() // Returns the names from the API - as many as are configured. function get_names(onget) { - const error_response = ["Errar", "Prablem"]; + const error_response = Array(15).fill(["Errar", "Prablem"]).flat(); const uri = "/api"; let req = new XMLHttpRequest(); @@ -34,6 +34,7 @@ function get_names(onget) if (this.readyState == 4) { if (this.status != 200) { onget(error_response); + return; } try {