Skip to content

Commit

Permalink
Delete schema promise on error...
Browse files Browse the repository at this point in the history
- Just because this way we can let the adapter an opportunity to yield a new error....
OR A SUCCESS
  • Loading branch information
flovilmart committed Jul 19, 2016
1 parent 867384f commit b3671df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Controllers/DatabaseController.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ DatabaseController.prototype.validateClassName = function(className) {
DatabaseController.prototype.loadSchema = function() {
if (!this.schemaPromise) {
this.schemaPromise = SchemaController.load(this.adapter);
this.schemaPromise.then(() => delete this.schemaPromise);
this.schemaPromise.then(() => delete this.schemaPromise,
() => delete this.schemaPromise);
}
return this.schemaPromise;
};
Expand Down

0 comments on commit b3671df

Please sign in to comment.