Permalink
Browse files

Don't set hasOwnExamples to true if a component's examples array only…

… contains inherited examples.
  • Loading branch information...
1 parent 53eb89c commit e370e0c94baf5191c7fb67d35b8d55bd6ea14fa5 @rgrove committed Aug 3, 2011
Showing with 11 additions and 2 deletions.
  1. +7 −0 HISTORY.md
  2. +3 −1 bin/selleck
  3. +1 −1 package.json
View
@@ -1,6 +1,13 @@
Selleck History
===============
+0.1.6 (git)
+-----------
+
+* Fixed a bug that caused the hasOwnExamples property to be set to true even if
+ a component only had inherited examples.
+
+
0.1.5 (2011-07-29)
------------------
View
@@ -230,7 +230,9 @@ if (options.server) {
if (err) { throw err; }
if (result.meta.examples) {
- result.meta.hasOwnExamples = true;
+ result.meta.hasOwnExamples = result.meta.examples.some(function (example) {
+ return !example.inherited;
+ });
}
components[result.meta.name] = result;
View
@@ -2,7 +2,7 @@
"name" : "selleck",
"description": "Generator for YUI's Handlebars-based user documentation.",
- "version" : "0.1.5",
+ "version" : "0.1.6-git",
"homepage" : "https://github.com/rgrove/selleck/",
"author" : "Ryan Grove <ryan@wonko.com> (http://wonko.com/)",
"copyright" : "Copyright (c) 2011 Yahoo! Inc. All rights reserved.",

0 comments on commit e370e0c

Please sign in to comment.