KDAB / codebrowser

Woboq CodeBrowser
http://woboq.com/codebrowser.html
Other
1.1k stars 161 forks source link

Last function in a file does not appear in the Definitions box #87

Open ghost opened 4 years ago

ghost commented 4 years ago

In codebrowser.js we have:

for (var i = 0; i < dfns.length - 1; ++i) {
            html += '<li><a href="#' + dfns[i].id + '" title="'+ dfns[i].title+ '" data-ref="'+ dfns[i].id +'">'+escape_html(dfns[i].textContent) +'</a></li>';
        }

It looks like the indexing is off by one since the last function in a file is not listed in the Definitions box. Should the loop condition be i < dfns.length instead?