Skip to content

Commit

Permalink
implement hasActiveDescendant
Browse files Browse the repository at this point in the history
  • Loading branch information
jessaustin committed Apr 8, 2016
1 parent 6c07089 commit ff2a1f2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gulp-nav.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ navInContext = (nav, context, root) ->
enumerable: yes
get: ->
navInContext root.obj, context.concat(root.name), root
hasActiveDescendant:
enumerable: yes
get: ->
@children.some (child) ->
child.active or child.hasActiveDescendant

# relative() and resolve() are just like the path functions, except trailing
# slashes are significant since we're dealing with URLs
Expand Down

0 comments on commit ff2a1f2

Please sign in to comment.