Don't request customers if list is already populated

This commit is contained in:
Rob Harrington
2018-06-22 15:31:32 +10:00
parent d1d9c5a092
commit 5e6291bce3

View File

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