Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

Commit

Permalink
fix failure-callback on service-discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
tbaum committed Jan 23, 2012
1 parent 11901f3 commit 5245de1
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions src/main/javascript/neo4j/GraphDatabase.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -290,11 +290,8 @@ _.extend(neo4j.GraphDatabase.prototype,
if (typeof (this._serviceDefinitionPromise) === "undefined") if (typeof (this._serviceDefinitionPromise) === "undefined")
{ {
var db = this; var db = this;
this._serviceDefinitionPromise = this.getDiscoveryDocument().then(function( discovery, fulfill, fail ) { this._serviceDefinitionPromise = this.getDiscoveryDocument().then(function (discovery, fulfill, fail) {
db.web.get( discovery.data , function(resources) db.web.get(discovery.data, fulfill, fail);
{
fulfill(resources);
});
}); });
} }


Expand All @@ -305,13 +302,8 @@ _.extend(neo4j.GraphDatabase.prototype,
if (typeof (this._discoveryDocumentPromise) === "undefined") if (typeof (this._discoveryDocumentPromise) === "undefined")
{ {
var db = this; var db = this;
this._discoveryDocumentPromise = new neo4j.Promise(function( this._discoveryDocumentPromise = new neo4j.Promise(function (fulfill, fail) {
fulfill, fail) db.web.get(db.url, fulfill, fail);
{
db.web.get(db.url, function(resources)
{
fulfill(resources);
});
}); });
} }


Expand Down

0 comments on commit 5245de1

Please sign in to comment.