From 847f6e01a13098021d192c7342cf804188970d9f Mon Sep 17 00:00:00 2001 From: jasonkneen Date: Fri, 12 May 2017 06:58:52 +0100 Subject: [PATCH] fix issue where mock collections error with no config --- reste.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reste.js b/reste.js index 4a007f9..12dbf8d 100644 --- a/reste.js +++ b/reste.js @@ -459,7 +459,7 @@ var main = function() { var body, onError; // if this is a collection, get the data and complete - if (model instanceof Backbone.Collection) { + if (model instanceof Backbone.Collection && modelConfig && modelConfig.collections) { var collectionConfig = _.where(modelConfig.collections, { name: model._name })[0];