mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Don't request customers if list is already populated
This commit is contained in:
@@ -4,6 +4,7 @@ angular.module("Darkswarm").factory 'Customers', (Customer) ->
|
||||
byID: {}
|
||||
|
||||
index: (params={}) ->
|
||||
return @all if @all.length
|
||||
Customer.index params, (data) => @load(data)
|
||||
@all
|
||||
|
||||
|
||||
Reference in New Issue
Block a user