Browse Source

Fix js error

Gaël Métais 11 years ago
parent
commit
e2532ad16e
1 changed files with 5 additions and 1 deletions
  1. 5 1
      app/public/scripts/resultsController.js

+ 5 - 1
app/public/scripts/resultsController.js

@@ -29,8 +29,12 @@ app.controller('ResultsCtrl', function ($scope) {
     };
 
     function parseBacktrace(str) {
-        var splited = str.split(' / ');
+        if (!str) {
+            return null;
+        }
+
         var out = [];
+        var splited = str.split(' / ');
         splited.forEach(function(trace) {
             var result = /^(\S*)\s?\(?(https?:\/\/\S+):(\d+)\)?$/g.exec(trace);
             if (result && result[2].length > 0) {