Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormegumi.telles2017-08-04 12:33:17 -0400
committermegumi.telles2017-08-04 12:33:17 -0400
commitcea03a19f3b90a8bc7c0a276f857bf582d99f402 (patch)
treee6632d6dc0dae200707e64d69c7c6e6ebcdff0a4
parent3e0364c060b4b366217dd2b39e9f3c270f8732c0 (diff)
downloadorg.eclipse.osee-cea03a19f3b90a8bc7c0a276f857bf582d99f402.tar.gz
org.eclipse.osee-cea03a19f3b90a8bc7c0a276f857bf582d99f402.tar.xz
org.eclipse.osee-cea03a19f3b90a8bc7c0a276f857bf582d99f402.zip
bug: Fix out of range index in dispo controller
-rw-r--r--plugins/org.eclipse.osee.web.ui/src/dispo/js/userController.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/org.eclipse.osee.web.ui/src/dispo/js/userController.js b/plugins/org.eclipse.osee.web.ui/src/dispo/js/userController.js
index ec57da1fc1..996a4ec554 100644
--- a/plugins/org.eclipse.osee.web.ui/src/dispo/js/userController.js
+++ b/plugins/org.eclipse.osee.web.ui/src/dispo/js/userController.js
@@ -146,9 +146,9 @@ app.controller('userController', [
var delta = bSplit[0] - aSplit[0];
if (delta == 0) {
- if (bSplit[1].match("RESULT") && !aSplit[1].match("RESULT")) {
+ if (isValidSize(aSplit, bSplit) && bSplit[1].match("RESULT") && !aSplit[1].match("RESULT")) {
return -1;
- } else if (!bSplit[1].match("RESULT") && aSplit[1].match("RESULT")) {
+ } else if (isValidSize(aSplit, bSplit) && !bSplit[1].match("RESULT") && aSplit[1].match("RESULT")) {
return 1;
} else {
return a.locationRefs.localeCompare(b.locationRefs);
@@ -158,6 +158,10 @@ app.controller('userController', [
}
}
}
+
+ var isValidSize = function (a, b) {
+ return (a.size > 1 && b.size > 1);
+ }
$scope.getSourceFlie = function() {
var requst = [];

Back to the top