ONOS-1722 - GUI -- QuickHelp unit tests written, minor other user input precautions added.
Change-Id: Ifeec1a014bc0dd72026295f2331c8fe5416330fd
diff --git a/web/gui/src/main/webapp/app/view/topo/topo.js b/web/gui/src/main/webapp/app/view/topo/topo.js
index 2415282..ed1dbc6 100644
--- a/web/gui/src/main/webapp/app/view/topo/topo.js
+++ b/web/gui/src/main/webapp/app/view/topo/topo.js
@@ -178,8 +178,23 @@
// --- Toolbar Functions ---------------------------------------------
+ function notValid(what) {
+ $log.warn('Topo.js getActionEntry(): Not a valid ' + what);
+ }
function getActionEntry(key) {
- var entry = actionMap[key];
+ var entry;
+
+ if (!key) {
+ notValid('key');
+ return null;
+ }
+
+ entry = actionMap[key];
+
+ if (!entry) {
+ notValid('actionMap entry');
+ return null;
+ }
return fs.isA(entry) || [entry, ''];
}