diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2023-07-04 13:05:50 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2023-07-04 19:04:28 +0300 |
commit | 7efb4f5c2ef19f8a077a79fb85378890368fc4e6 (patch) | |
tree | 7c9b3200d1f0cf36861ed58fda2185e390dae572 /lib | |
parent | 3c9aef8839fd0c137a60c6c322f75fbfc325d862 (diff) |
Define the repo outside the if clause
Diffstat (limited to 'lib')
-rw-r--r-- | lib/helpers/edit_on_gitlab.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/helpers/edit_on_gitlab.rb b/lib/helpers/edit_on_gitlab.rb index cbaac803..d9f45555 100644 --- a/lib/helpers/edit_on_gitlab.rb +++ b/lib/helpers/edit_on_gitlab.rb @@ -54,7 +54,8 @@ module Nanoc::Helpers # content file inside gitlab-docs. identifier_path = item.identifier.to_s.delete_prefix("/") product, _, repo_doc_path = identifier_path.partition("/") - if repo = PRODUCT_REPOS[product] + repo = PRODUCT_REPOS[product] + if repo file_path = "#{repo[:doc_directory]}/#{repo_doc_path}" return repo.merge({ file_path: file_path }) end |