From 3986eaa4bf97f077269d56d6e6a365cb1fcab8e3 Mon Sep 17 00:00:00 2001
From: Juan Fuentes <juanf@bs-mbpr465.d.ethz.ch>
Date: Fri, 27 Aug 2021 14:22:51 +0200
Subject: [PATCH] more resiliense against buggy settings

---
 .../eln-lims/1/as/webapps/eln-lims/html/js/util/Util.js        | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/Util.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/Util.js
index 8086d406a9b..e18a52db3f5 100644
--- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/Util.js
+++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/util/Util.js
@@ -769,7 +769,8 @@ var Util = new function() {
     
     this.elementEndsWithArrayElement = function(element, elementsToEndWith) {
     		for(var aIdx = 0; aIdx < elementsToEndWith.length; aIdx++) {
-    			if(element.endsWith(elementsToEndWith[aIdx])) {
+    		    var elementToEndWith = elementsToEndWith[aIdx];
+    			if((typeof elementToEndWith === 'string' || elementToEndWith instanceof String) && element.endsWith(elementToEndWith)) {
     				return true;
     			}
     		}
-- 
GitLab