Bugfix for exception thrown when the name of a member seen by the parser matches a name on the Object prototype. closes #116

This commit is contained in:
Michael Mathews 2012-05-03 08:12:08 +01:00
parent 402159b8a8
commit e0538ae011

View File

@ -185,7 +185,7 @@ exports.Parser.prototype.astnodeToMemberof = function(node) {
id = 'astnode'+scope.enclosingFunction.hashCode(); id = 'astnode'+scope.enclosingFunction.hashCode();
doclet = this.refs[id]; doclet = this.refs[id];
if (doclet && doclet.meta.vars && basename in doclet.meta.vars) { if (doclet && doclet.meta.vars && basename in doclet.meta.vars) {
var alias = doclet.meta.vars[basename]; var alias = doclet.meta.vars.hasOwnProperty(basename)? doclet.meta.vars[basename] : false;
if (alias !== false) { if (alias !== false) {
return [alias, basename]; return [alias, basename];
} }