Make navigation API more robust.
Fixes https://github.com/foodcoops/foodsoft/issues/755.
This commit is contained in:
parent
912f57ba42
commit
78c4ebcb4b
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ class Api::V1::NavigationsController < Api::V1::BaseController
|
|||
items.map do |item|
|
||||
r = {}
|
||||
r[:name] = item[:name]
|
||||
r[:url] = request.base_url + item[:url] if item[:url] != '#'
|
||||
r[:url] = request.base_url + item[:url] if item[:url] && item[:url] != '#'
|
||||
r[:items] = transform(item[:items]) if item[:items]
|
||||
r
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue