Commit c0296fd8 authored by Iker Hurtado's avatar Iker Hurtado
Browse files

Bugfixing (Issue 125)

parent 441bb5f8
Pipeline #32615 passed with stages
in 6 seconds
......@@ -8824,13 +8824,13 @@
LoadingPopup.show();
let oReq = util.serverReqPOST(util.getSearchURL(), postQuery, e => {
let data= JSON.parse(e.target.response);
//console.log('SENDING: ', data);
console.log('SENDING: ', data);
if (e.target.status === 200){
this.total_results= data.total_results;
this.pagesNum= (data.pages === null ? 1 : data.pages.pages);
let matData= data.results;
if (matData.length === 1){
if (/*matData.length === 1 && */this.total_results === 1){
util.setBrowserHashPath('material',+matData[0].id);
util.searchResults = false;
}else{
......
......@@ -135,13 +135,13 @@ class MaterialList {
LoadingPopup.show();
let oReq = util.serverReqPOST(util.getSearchURL(), postQuery, e => {
let data= JSON.parse(e.target.response);
//console.log('SENDING: ', data);
console.log('SENDING: ', data);
if (e.target.status === 200){
this.total_results= data.total_results;
this.pagesNum= (data.pages === null ? 1 : data.pages.pages);
let matData= data.results;
if (matData.length === 1){
if (/*matData.length === 1 && */this.total_results === 1){
util.setBrowserHashPath('material',+matData[0].id);
util.searchResults = false;
}else{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment