From 828e62be234ac4bf95680d474a8bf3ea65b30064 Mon Sep 17 00:00:00 2001 From: Glen Turner <8gt6@queensu.ca> Date: Wed, 1 Jul 2015 09:16:07 -0700 Subject: [PATCH] backend/js/ros_scripts.js: changes to clearing ros.nodes and ros.topics arrays --- backend/js/ros_scripts.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/js/ros_scripts.js b/backend/js/ros_scripts.js index d93df2b..4b05717 100644 --- a/backend/js/ros_scripts.js +++ b/backend/js/ros_scripts.js @@ -31,8 +31,8 @@ ros.on('connection', function() { document.getElementById("rosbridgeconnection_badge").innerHTML = 'Connected'; document.getElementById("ConnectionButton").className = "btn btn-success" - ros.nodes = []; - ros.topics = []; + ros.nodes = Array(); + ros.topics = Array(); }); @@ -43,8 +43,8 @@ ros.on('close', function() { document.getElementById("ConnectionIPLabel").innerHTML = 'Connection closed'; document.getElementById("ConnectionButton").className = "btn btn-warning" document.getElementById("rosbridgeconnection_badge").innerHTML = 'Connection closed'; - ros.nodes = []; - ros.topics = []; + ros.nodes = Array(); + ros.topics = Array(); }); // Create a connection to the rosbridge WebSocket server. ros.connect(ros.connectionName);