In to_uri, if there are not components, return "/".
diff --git a/js/Name.js b/js/Name.js
index 53495d4..3a15c0b 100644
--- a/js/Name.js
+++ b/js/Name.js
@@ -154,6 +154,9 @@
 
 // Return the escaped name string according to "CCNx URI Scheme".
 Name.prototype.to_uri = function() {	
+    if (this.components.length == 0)
+        return "/";
+    
 	var result = "";
 	
 	for(var i = 0; i < this.components.length; ++i)