Skip to content
Snippets Groups Projects
Commit 51b8d9f3 authored by juanf's avatar juanf
Browse files

SSDM-110: Infinite loop bugfix, thanks Kuba!

SVN: 31428
parent 61a31d5c
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment