@@ -35,11 +35,17 @@ export default class AdminCommands extends Vue {
cnt = 0
setResponse(data) {
- if(! Array.isArray(data)) {
- data = []
+ this.responses = []
+
+ if(Array.isArray(data) == false || data.length == 0) {
+ this.cnt++
+ this.responses.push({
+ cnt: this.cnt,
+ data: 'no results'
+ })
+ return
}
- this.responses = []
for (let index = 0; index < data.length; index++) {
this.cnt++
this.responses.push({