diff --git a/templates/haruki/publish.js b/templates/haruki/publish.js index 0b5233a9..b6837eff 100644 --- a/templates/haruki/publish.js +++ b/templates/haruki/publish.js @@ -18,8 +18,9 @@ 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 + if (to.constructor) { // like a class to = to.constructor; } } @@ -45,8 +46,16 @@ "nullable": typeof element.param[i].nullable === 'boolean'? element.param[i].nullable : "" }); } + to = _to; } else if (element.kind === 'property') { + var _to = to; + if (element.scope === 'static') { + if (to.constructor) { // like a class + to = to.constructor; + } + } + if (! to.properties) { to.properties = {}; } @@ -56,6 +65,7 @@ "description" : element.desc || "", "type": element.type? (element.type.length === 1? element.type[0] : element.type) : "" }; + to = _to; } else if (element.kind === 'constructor') { if (! to.classes) {