diff options
author | megumi.telles | 2017-08-04 16:33:17 +0000 |
---|---|---|
committer | megumi.telles | 2017-08-04 16:33:17 +0000 |
commit | cea03a19f3b90a8bc7c0a276f857bf582d99f402 (patch) | |
tree | e6632d6dc0dae200707e64d69c7c6e6ebcdff0a4 /plugins/org.eclipse.osee.web.ui | |
parent | 3e0364c060b4b366217dd2b39e9f3c270f8732c0 (diff) | |
download | org.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
Diffstat (limited to 'plugins/org.eclipse.osee.web.ui')
-rw-r--r-- | plugins/org.eclipse.osee.web.ui/src/dispo/js/userController.js | 8 |
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 ec57da1fc16..996a4ec5543 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 = []; |