From 86a3fbacd10346dda57e2a6d8f9da47b39f001d2 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Mon, 7 Jul 2014 10:09:12 -0700 Subject: [PATCH] Made the CocoCollection more strict about setting the model property. --- app/collections/CocoCollection.coffee | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/collections/CocoCollection.coffee b/app/collections/CocoCollection.coffee index 817b0700f..bb051811c 100644 --- a/app/collections/CocoCollection.coffee +++ b/app/collections/CocoCollection.coffee @@ -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