Merge pull request #1009 from strongloop/declare_definition_in_destroy

Declare `definition`
This commit is contained in:
Amir-61 2016-07-23 00:21:31 -04:00 committed by GitHub
commit 20d8047198
1 changed files with 3 additions and 2 deletions

View File

@ -1366,9 +1366,10 @@ BelongsTo.prototype.destroy = function(options, cb) {
cb = options;
options = {};
}
var modelTo = this.definition.modelTo;
var definition = this.definition;
var modelInstance = this.modelInstance;
var fk = this.definition.keyFrom;
var fk = definition.keyFrom;
cb = cb || utils.createPromiseCallback();