From 26c3b7b1979beb6b36e76146367d1dc0c0eeec69 Mon Sep 17 00:00:00 2001
From: Nathanael Jourdane <nathanael.jourdane@irap.omp.eu>
Date: Mon, 4 Sep 2017 18:33:22 +0200
Subject: [PATCH] prevent clics on services without results

---
 js/app/controllers/EpnTapModule.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/js/app/controllers/EpnTapModule.js b/js/app/controllers/EpnTapModule.js
index ee159cc..2619e3e 100644
--- a/js/app/controllers/EpnTapModule.js
+++ b/js/app/controllers/EpnTapModule.js
@@ -166,9 +166,8 @@ Ext.define('amdaDesktop.EpnTapModule', {
 		this.granulesStore.selectedService = record.data.id;
 		Ext.Ajax.suspendEvent('requestexception');
 		Ext.Ajax.abortAll();
-		var nbRes = record.get('nb_results');
 
-		if(nbRes > 0 && !isNaN(nbRes)) { // TODO replace !isNaN(nbRes) by this.selectedService.get('success')
+		if(record.get('nb_results') > 0) {
 			this.granulesStore.load({
 				params: {'action': 'getGranules'},
 				callback: function (records, operation, success) {
--
libgit2 0.21.2