commit | 9530663b96dee979507de526213d1841bde5eaa3 | [log] [tgz] |
---|---|---|
author | Jeff Thompson <jeff@thefirst.org> | Wed Jan 23 19:20:37 2013 -0800 |
committer | Jeff Thompson <jeff@thefirst.org> | Wed Jan 23 19:20:37 2013 -0800 |
tree | ac5b7b305f7467f2627812f3a158475ec261b222 | |
parent | 1ac86ce905edc675eefcce7a0206a7ae7138bd80 [diff] [blame] |
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)