diff --git a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/server/ServerFacade.js b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/server/ServerFacade.js index 2d1eb5e7e1c201aa5865be5773a55ab3227ac6a3..808750359157964e62ba7e74d61af4fcf87b8b8b 100644 --- a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/server/ServerFacade.js +++ b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/server/ServerFacade.js @@ -210,11 +210,13 @@ function ServerFacade(openbisServer) { // // Fix Result List // + var visitedSamples = {}; function fixSamples(result) { for(var i = 0; i < result.length; i++) { var sampleOrId = result[i]; + if (isNaN(sampleOrId)) { sampleOrId = samplesById[sampleOrId["@id"]]; @@ -223,6 +225,12 @@ function ServerFacade(openbisServer) { sampleOrId = samplesById[sampleOrId]; } result[i] = sampleOrId; + if(visitedSamples[sampleOrId.permId]) { + continue; + } else { + visitedSamples[sampleOrId.permId] = true; + } + console.log(sampleOrId.code); //Fill Parents if(sampleOrId.parents) {