From d78e644eb870699591e82b8ce4c35f6df5f1abec Mon Sep 17 00:00:00 2001 From: rolux Date: Sat, 2 Jun 2012 11:49:14 +0200 Subject: [PATCH] Ox.doc: make sure root item properties get included in inherited properties --- source/Ox/js/JavaScript.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/Ox/js/JavaScript.js b/source/Ox/js/JavaScript.js index bfe03d88..733d8f34 100644 --- a/source/Ox/js/JavaScript.js +++ b/source/Ox/js/JavaScript.js @@ -114,7 +114,10 @@ Ox.doc = (function() { Ox.forEach(getChains(nodes), function(chain, childName) { var child = instances[childName]; chain.forEach(function(parentName) { - var parent = instances[parentName] || null; + var parent = instances[parentName] + || Ox.last(items[Ox.indexOf(items, function(item) { + return item.name == parentName; + })].returns); parent && parent.properties && parent.properties.forEach(function(property) { if (!hasProperty(child, property)) { if (!child.inherited) { @@ -180,7 +183,7 @@ Ox.doc = (function() { constructors.concat(getConstructors(item[key])); } }); - }) + }); return constructors; } function getIndent(string) {