mirror of https://gitee.com/bigwinds/arangodb
Fixed a bug with undefined values printed to console.log but they had no effect
This commit is contained in:
parent
875100a195
commit
521a46088c
|
@ -2,13 +2,15 @@
|
||||||
/*global window, Backbone, $, window, _*/
|
/*global window, Backbone, $, window, _*/
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
window.ArangoDatabase = Backbone.Collection.extend({
|
window.ArangoDatabase = Backbone.Collection.extend({
|
||||||
|
|
||||||
model: window.Database,
|
model: window.Database,
|
||||||
|
|
||||||
comparator: "name",
|
comparator: "name",
|
||||||
|
|
||||||
sync: function(method, model, options) {
|
sync: function(method, model, options) {
|
||||||
'use strict';
|
|
||||||
if (method === "read") {
|
if (method === "read") {
|
||||||
options.url = model.url() + "user";
|
options.url = model.url() + "user";
|
||||||
}
|
}
|
||||||
|
@ -20,6 +22,9 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
parse: function(response) {
|
parse: function(response) {
|
||||||
|
if (!response) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
return _.map(response.result, function(v) {
|
return _.map(response.result, function(v) {
|
||||||
return {name:v};
|
return {name:v};
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue