simplify the implementation for app.remoteObjects
This commit is contained in:
parent
88d41f84fd
commit
2748a68c05
|
@ -260,13 +260,12 @@ app.connector = function(name, connector) {
|
|||
*/
|
||||
|
||||
app.remoteObjects = function() {
|
||||
var result = {};
|
||||
|
||||
this.remotes().classes().forEach(function(sharedClass) {
|
||||
result[sharedClass.name] = sharedClass.ctor;
|
||||
});
|
||||
|
||||
return result;
|
||||
return this.remotes().classes().reduce(
|
||||
function(results, sharedClass) {
|
||||
results[sharedClass.name] = sharedClass.ctor;
|
||||
},
|
||||
{}
|
||||
);
|
||||
};
|
||||
|
||||
/*!
|
||||
|
|
Loading…
Reference in New Issue