diff --git a/lib/fbutil.js b/lib/fbutil.js index 393730f..e31fecd 100644 --- a/lib/fbutil.js +++ b/lib/fbutil.js @@ -16,6 +16,7 @@ exports.fbRef = function(path) { }; exports.pathName = function(ref) { + if(typeof ref.parent === 'undefined') return ref.path; var p = ref.parent.key; return (p? p+'/' : '')+ref.key; };