mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
clean up redundant code
This commit is contained in:
parent
6edb4a1817
commit
d78b10a890
@ -379,11 +379,9 @@ exports.Parser.prototype._makeEvent = function(node, extras) {
|
||||
}
|
||||
|
||||
// make sure the result includes extras that don't have default values
|
||||
for (var prop in extras) {
|
||||
if ( hasOwnProp.call(extras, prop) ) {
|
||||
Object.keys(extras).forEach(function(prop) {
|
||||
result[prop] = extras[prop];
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
};
|
||||
@ -602,12 +600,8 @@ exports.Parser.prototype.astnodeToMemberof = function(node) {
|
||||
while(scope.enclosingFunction) {
|
||||
id = 'astnode' + scope.enclosingFunction.hashCode();
|
||||
doclet = this.refs[id];
|
||||
if (doclet && doclet.meta.vars && basename in doclet.meta.vars) {
|
||||
alias = hasOwnProp.call(doclet.meta.vars, basename) ?
|
||||
doclet.meta.vars[basename] : false;
|
||||
if (alias !== false) {
|
||||
return [alias, basename];
|
||||
}
|
||||
if ( doclet && doclet.meta.vars && hasOwnProp.call(doclet.meta.vars, basename) ) {
|
||||
return [doclet.meta.vars[basename], basename];
|
||||
}
|
||||
// move up
|
||||
scope = scope.enclosingFunction;
|
||||
@ -615,10 +609,7 @@ exports.Parser.prototype.astnodeToMemberof = function(node) {
|
||||
// First check to see if we have a global scope alias
|
||||
doclet = this.refs.__global__;
|
||||
if ( doclet && doclet.meta.vars && hasOwnProp.call(doclet.meta.vars, basename) ) {
|
||||
alias = doclet.meta.vars[basename];
|
||||
if (alias !== false) {
|
||||
return [alias, basename];
|
||||
}
|
||||
return [doclet.meta.vars[basename], basename];
|
||||
}
|
||||
|
||||
id = 'astnode' + node.parent.hashCode();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user