mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
Fixed bug that prevented functions from being attached to non-classes in Haruki template.
This commit is contained in:
parent
36b2684b9a
commit
9c66a00755
@ -18,16 +18,18 @@
|
||||
addDocNode(thisNamespace, from, element.path, element.name);
|
||||
}
|
||||
else if (element.kind === 'method') {
|
||||
//var _to = to;
|
||||
if (element.scope === 'static') {
|
||||
if (to.constructo) { // like a class
|
||||
to = to.constructor;
|
||||
}
|
||||
}
|
||||
|
||||
if (! to.functions) {
|
||||
to.functions = {};
|
||||
}
|
||||
var thisFunction = to.functions[element.name] = {
|
||||
"name" : element.name,
|
||||
"access": element.access || "",
|
||||
"description" : element.desc || "",
|
||||
"parameters": [
|
||||
]
|
||||
@ -43,8 +45,6 @@
|
||||
"nullable": typeof element.param[i].nullable === 'boolean'? element.param[i].nullable : ""
|
||||
});
|
||||
}
|
||||
//to = _to;
|
||||
|
||||
}
|
||||
else if (element.kind === 'property') {
|
||||
if (! to.properties) {
|
||||
@ -52,6 +52,7 @@
|
||||
}
|
||||
to.properties[element.name] = {
|
||||
"name" : element.name,
|
||||
"access": element.access || "",
|
||||
"description" : element.desc || "",
|
||||
"type": element.type? (element.type.length === 1? element.type[0] : element.type) : ""
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user