From a85649c54529abe99b03fb74dc9e115b3226b775 Mon Sep 17 00:00:00 2001
From: barillac <barillac>
Date: Mon, 2 Mar 2015 13:44:21 +0000
Subject: [PATCH] bugfix for blank screen when opening samples

SVN: 33540
---
 .../newbrowser/html/js/views/legacy/Inspector.js       | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/legacy/Inspector.js b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/legacy/Inspector.js
index 1e895407d7b..237e51080c6 100644
--- a/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/legacy/Inspector.js
+++ b/plasmid/source/core-plugins/newbrowser/1/as/webapps/newbrowser/html/js/views/legacy/Inspector.js
@@ -44,6 +44,11 @@ function Inspector(serverFacade, containerId, profile) {
 	}
 	
 	this.containsByPermId = function(permId) {
+		//Bugfix Hack to avoid blank screens
+		if(!this.inspectedSamples) {
+			this.inspectedSamples = [];
+		}
+
 		for(var i = 0; i < this.inspectedSamples.length; i++) {
 			if(this.inspectedSamples[i].permId === permId) {
 				return i;
@@ -53,6 +58,11 @@ function Inspector(serverFacade, containerId, profile) {
 	}
 	
 	this.containsSample = function(sample) {
+		//Bugfix Hack to avoid blank screens
+		if(!this.inspectedSamples) {
+			this.inspectedSamples = [];
+		}
+
 		for(var i = 0; i < this.inspectedSamples.length; i++) {
 			if(this.inspectedSamples[i].permId === sample.permId) {
 				return i;
-- 
GitLab