##// END OF EJS Templates
js: add check to eliminate js errors when inline comment function references an object which does not exist
lisaq -
r695:bbba5e47 default
parent child Browse files
Show More
@@ -282,8 +282,10 b' var placeInline = function(target_contai'
282 var target_line = $('#' + lineid).get(0);
282 var target_line = $('#' + lineid).get(0);
283 var comment = new $(tableTr('inline-comments', html));
283 var comment = new $(tableTr('inline-comments', html));
284 // check if there are comments already !
284 // check if there are comments already !
285 if (target_line) {
285 var parent_node = target_line.parentNode;
286 var parent_node = target_line.parentNode;
286 var root_parent = parent_node;
287 var root_parent = parent_node;
288
287 while (1) {
289 while (1) {
288 var n = parent_node.nextElementSibling;
290 var n = parent_node.nextElementSibling;
289 // next element are comments !
291 // next element are comments !
@@ -301,6 +303,7 b' var placeInline = function(target_contai'
301 if (show_add_button) {
303 if (show_add_button) {
302 placeAddButton(root_parent);
304 placeAddButton(root_parent);
303 }
305 }
306 }
304
307
305 return target_line;
308 return target_line;
306 };
309 };
General Comments 0
You need to be logged in to leave comments. Login now