Commits

Aljoša Mohorović committed 854441a

fixed an issue in javascript when "path" doesn't exist

Comments (0)

Files changed (1)

_jitviewer/static/app.js

     "a[data-name] click": function(el, ev) {
         ev.preventDefault();
         var name = el.data('name');
-        var path = el.data('path');
+        var path = el.data('path') || "";
         if(name) {
             can.route.attr({'name': name, 'path': path});
         }
     ".operations a.inlined_call click": function(el, ev) {
         ev.preventDefault();
         var name = el.data('name');
-        var path = el.data('path');
+        var path = el.data('path') || "";
         if(name) {
             can.route.attr({'name': name, 'path': path});
         }
     ".operations a.bridgelink click": function(el, ev) {
         ev.preventDefault();
         var name = el.data('name');
-        var path = el.data('path');
+        var path = el.data('path') || "";
         if(name) {
             can.route.attr({'name': name, 'path': path});
         }
     ".operations .single-operation a click": function(el, ev) {
         ev.preventDefault();
         var name = el.data('name');
-        var path = el.data('path');
+        var path = el.data('path') || "";
         if(name) {
             can.route.attr({'name': name, 'path': path});
         }
     "#loops .loopitem a click": function(el, ev){
         ev.preventDefault();
         var name = el.data('name');
-        var path = el.data('path');
+        var path = el.data('path') || "";
+        console.log("loop:", name, path);
         if(name) {
             can.route.attr({'name': name, 'path': path});
         }
     "#callstack a click": function(el, ev){
         ev.preventDefault();
         var name = el.data('name');
-        var path = el.data('path');
+        var path = el.data('path') || "";
         if(name) {
             can.route.attr({'name': name, 'path': path});
         }