Only show sidebar options that exist
Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/35fc1523 Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/35fc1523 Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/35fc1523 Branch: refs/heads/master Commit: 35fc1523a085625f408cd3ac1d44b7d4ca51a0f5 Parents: 92964af Author: Garren Smith <[email protected]> Authored: Mon Oct 6 14:30:56 2014 +0200 Committer: Garren Smith <[email protected]> Committed: Tue Oct 7 10:27:36 2014 +0200 ---------------------------------------------------------------------- app/addons/documents/views-sidebar.js | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/35fc1523/app/addons/documents/views-sidebar.js ---------------------------------------------------------------------- diff --git a/app/addons/documents/views-sidebar.js b/app/addons/documents/views-sidebar.js index 9ce2ca6..9fa6b58 100644 --- a/app/addons/documents/views-sidebar.js +++ b/app/addons/documents/views-sidebar.js @@ -157,6 +157,8 @@ function(app, FauxtonAPI, Components, Documents, Databases) { var design = this.model.id.replace(/^_design\//,""); var databaseId = this.model.database.id; + if (_.isUndefined(designDocs[info.selector])) { return; } + this.insertView(".accordion-body", new Views.IndexItem({ selector: info.selector, ddoc: design,
