From 521a46088c334e37685a6caf6ee7e9dd7188bfbe Mon Sep 17 00:00:00 2001 From: Michael Hackstein Date: Thu, 30 Jan 2014 20:39:37 +0100 Subject: [PATCH] Fixed a bug with undefined values printed to console.log but they had no effect --- .../aardvark/frontend/js/collections/arangoDatabase.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/apps/system/aardvark/frontend/js/collections/arangoDatabase.js b/js/apps/system/aardvark/frontend/js/collections/arangoDatabase.js index 498273fdb4..d329190b49 100644 --- a/js/apps/system/aardvark/frontend/js/collections/arangoDatabase.js +++ b/js/apps/system/aardvark/frontend/js/collections/arangoDatabase.js @@ -2,13 +2,15 @@ /*global window, Backbone, $, window, _*/ (function() { + 'use strict'; + window.ArangoDatabase = Backbone.Collection.extend({ + model: window.Database, comparator: "name", sync: function(method, model, options) { - 'use strict'; if (method === "read") { options.url = model.url() + "user"; } @@ -20,6 +22,9 @@ }, parse: function(response) { + if (!response) { + return; + } return _.map(response.result, function(v) { return {name:v}; });