X-Git-Url: https://git.sesse.net/?p=remoteglot;a=blobdiff_plain;f=www%2Fjs%2Fremoteglot.js;h=8bb49d27a539f4c14ae5d567b0e54b0c079c092f;hp=d259e272f9d9229a95e11a8bc2ac53a12835846e;hb=d757645e7300de9d75fd5d428aedacfeb426dc73;hpb=7d32d14ab6626993cc72c1d3cebc40f13e95dbed diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index d259e27..8bb49d2 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -33,8 +33,12 @@ var request_update = function(board) { var clear_arrows = function() { for (var i = 0; i < arrows.length; ++i) { - jsPlumb.detach(arrows[i].connection1); - jsPlumb.detach(arrows[i].connection2); + if (arrows[i].connection1) { + jsPlumb.detach(arrows[i].connection1); + } + if (arrows[i].connection2) { + jsPlumb.detach(arrows[i].connection2); + } } arrows = [];