diff options
author | David O'Regan <doregan@gitlab.com> | 2021-03-24 20:15:08 +0300 |
---|---|---|
committer | Suzanne Selhorn <sselhorn@gitlab.com> | 2021-03-24 20:15:08 +0300 |
commit | fde9952a8ebb75227d1879b3999203dca672a26f (patch) | |
tree | e73a871e26ba09b25267e1eb58f66ae944e480f4 /lib/gitlab/navigation/doc.rb | |
parent | 89883be9e9cfad350b3959b281583ae8728e4da2 (diff) |
Feat: Update left navigation to allow more levels
Diffstat (limited to 'lib/gitlab/navigation/doc.rb')
-rw-r--r-- | lib/gitlab/navigation/doc.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/navigation/doc.rb b/lib/gitlab/navigation/doc.rb index 8bed2d43..27c75d7d 100644 --- a/lib/gitlab/navigation/doc.rb +++ b/lib/gitlab/navigation/doc.rb @@ -25,8 +25,12 @@ module Gitlab doc[:ee_tier] end + def has_children? + !children.empty? + end + def children - [] + @children ||= doc.fetch(:docs, []).map { |doc| Doc.new(doc) } end private |