mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Check missing lat/long instead of zero
This commit is contained in:
@@ -3,7 +3,7 @@ Darkswarm.factory "OfnMap", (Enterprises, EnterpriseModal, visibleFilter) ->
|
||||
constructor: ->
|
||||
@enterprises = @enterprise_markers(Enterprises.enterprises)
|
||||
@enterprises = @enterprises.filter (enterprise) ->
|
||||
enterprise.latitude || enterprise.longitude # Remove enterprises w/o lat or long
|
||||
enterprise.latitude != null || enterprise.longitude != null # Remove enterprises w/o lat or long
|
||||
|
||||
enterprise_markers: (enterprises) ->
|
||||
@extend(enterprise) for enterprise in visibleFilter(enterprises)
|
||||
|
||||
@@ -9,8 +9,8 @@ describe "Hubs service", ->
|
||||
orders_close_at: new Date()
|
||||
type: "hub"
|
||||
visible: true
|
||||
latitude: 50
|
||||
longitude: 50
|
||||
latitude: 0
|
||||
longitude: 0
|
||||
}
|
||||
{
|
||||
id: 3
|
||||
|
||||
Reference in New Issue
Block a user