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}; });