Check missing lat/long instead of zero

This commit is contained in:
Steve Pettitt
2016-03-03 06:41:59 +00:00
parent c1d068aeb9
commit 4966290f87
2 changed files with 3 additions and 3 deletions

View File

@@ -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)

View File

@@ -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