Permalink
Browse files

fix failure-callback on service-discovery

  • Loading branch information...
1 parent 11901f3 commit 5245de13f5b08d214a427ca54e296f14a661d934 @tbaum tbaum committed Jan 23, 2012
Showing with 4 additions and 12 deletions.
  1. +4 −12 src/main/javascript/neo4j/GraphDatabase.js
@@ -290,11 +290,8 @@ _.extend(neo4j.GraphDatabase.prototype,
if (typeof (this._serviceDefinitionPromise) === "undefined")
{
var db = this;
- this._serviceDefinitionPromise = this.getDiscoveryDocument().then(function( discovery, fulfill, fail ) {
- db.web.get( discovery.data , function(resources)
- {
- fulfill(resources);
- });
+ this._serviceDefinitionPromise = this.getDiscoveryDocument().then(function (discovery, fulfill, fail) {
+ db.web.get(discovery.data, fulfill, fail);
});
}
@@ -305,13 +302,8 @@ _.extend(neo4j.GraphDatabase.prototype,
if (typeof (this._discoveryDocumentPromise) === "undefined")
{
var db = this;
- this._discoveryDocumentPromise = new neo4j.Promise(function(
- fulfill, fail)
- {
- db.web.get(db.url, function(resources)
- {
- fulfill(resources);
- });
+ this._discoveryDocumentPromise = new neo4j.Promise(function (fulfill, fail) {
+ db.web.get(db.url, fulfill, fail);
});
}

0 comments on commit 5245de1

Please sign in to comment.