Skip to content

Commit 20d8047

Browse files
authored
Merge pull request #1009 from strongloop/declare_definition_in_destroy
Declare `definition`
2 parents bed8ca2 + 8d4c577 commit 20d8047

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/relation-definition.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,9 +1366,10 @@ BelongsTo.prototype.destroy = function(options, cb) {
13661366
cb = options;
13671367
options = {};
13681368
}
1369-
var modelTo = this.definition.modelTo;
1369+
1370+
var definition = this.definition;
13701371
var modelInstance = this.modelInstance;
1371-
var fk = this.definition.keyFrom;
1372+
var fk = definition.keyFrom;
13721373

13731374
cb = cb || utils.createPromiseCallback();
13741375

0 commit comments

Comments
 (0)