Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Lazy collections not working

- urlFunc was being invoked when apiRoot was prepended, should be
  deferred
  • Loading branch information...
commit a312a18934f28300fd0e028a1141a0252ffd9660 1 parent 96fe406
@jawsthegame jawsthegame authored
Showing with 8 additions and 7 deletions.
  1. +8 −7 models/loader.coffee
View
15 models/loader.coffee
@@ -12,13 +12,14 @@ module.exports =
for name, collectionType of collectionTypes
collection = new collectionType
- if $.isFunction(collection.url)
- urlFunc = collection.url
- collection.url = do ->
- apiRoot + urlFunc()
- else
- collection.url = apiRoot + collection.url
- collections[name] = collection
+ do (collection) ->
+ if $.isFunction(collection.url)
+ urlFunc = collection.url
+ collection.url = ->
+ apiRoot + urlFunc()
+ else
+ collection.url = apiRoot + collection.url
+ collections[name] = collection
root = apiRoot
Please sign in to comment.
Something went wrong with that request. Please try again.