mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-02-25 05:54:51 -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
|
module.exports = class CocoCollection extends Backbone.Collection
|
||||||
loaded: false
|
loaded: false
|
||||||
|
model: null
|
||||||
|
|
||||||
initialize: ->
|
initialize: ->
|
||||||
|
if not @model
|
||||||
|
console.error @constructor.name, 'does not have a model defined. This will not do!'
|
||||||
super()
|
super()
|
||||||
@once 'sync', =>
|
@once 'sync', =>
|
||||||
@loaded = true
|
@loaded = true
|
||||||
|
|
Loading…
Reference in a new issue