distint array and object

This commit is contained in:
Valentin CZERYBA 2022-08-25 22:08:03 +02:00
parent 4012655671
commit 8819e6124f

View File

@ -80,7 +80,11 @@ for (var i=0; i<listQuery.length; i++){
}
instance.get("users", {withCredentials: true, params :param}).then(function(response){
listData = response.data;
var listData = response.data;
if(!Array.isArray(listData)){
var listData = []
listData.push(response.data);
}
for (var i=0; i<listData.length; i++){
var trTag = document.querySelector("#users tbody tr").cloneNode(true);
if(i != 0){