mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 09:35:39 -05:00
Made the CocoCollection more strict about setting the model property.
This commit is contained in:
parent
3151db6fc5
commit
86a3fbacd1
1 changed files with 5 additions and 0 deletions
|
@ -1,7 +1,12 @@
|
|||
CocoModel = require 'models/CocoModel'
|
||||
|
||||
module.exports = class CocoCollection extends Backbone.Collection
|
||||
loaded: false
|
||||
model: null
|
||||
|
||||
initialize: ->
|
||||
if not @model
|
||||
console.error @constructor.name, 'does not have a model defined. This will not do!'
|
||||
super()
|
||||
@once 'sync', =>
|
||||
@loaded = true
|
||||
|
|
Loading…
Reference in a new issue