mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
fix performance regression caused by 2eb3c46 (#784)
This commit is contained in:
parent
2b34c5167a
commit
c510b336d2
@ -455,7 +455,7 @@ Parser.prototype.resolvePropertyParents = function(node) {
|
||||
doclets.push(doclet);
|
||||
}
|
||||
|
||||
// if the next ancestor's parent is an assignment expression (for example, `exports.FOO` in
|
||||
// if the next ancestor is an assignment expression (for example, `exports.FOO` in
|
||||
// `var foo = exports.FOO = { x: 1 }`, keep walking upwards
|
||||
if (nextAncestor && nextAncestor.type === Syntax.AssignmentExpression) {
|
||||
nextAncestor = nextAncestor.parent;
|
||||
@ -512,14 +512,15 @@ Parser.prototype.resolveEnum = function(e) {
|
||||
|
||||
// members of an enum inherit the enum's type
|
||||
if (doclet.type && !e.doclet.type) {
|
||||
e.doclet.type = doclet.type;
|
||||
// clone the type to prevent circular refs
|
||||
e.doclet.type = jsdoc.util.doop(doclet.type);
|
||||
}
|
||||
|
||||
delete e.doclet.undocumented;
|
||||
e.doclet.defaultvalue = e.doclet.meta.code.value;
|
||||
|
||||
// add a copy of the doclet to the parent's properties
|
||||
doclet.properties.push( jsdoc.util.doop(e.doclet) );
|
||||
// add the doclet to the parent's properties
|
||||
doclet.properties.push(e.doclet);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user