From 8d4c5770327bb0c783548c52020e1e5b6164b891 Mon Sep 17 00:00:00 2001 From: Amir Jafarian Date: Fri, 22 Jul 2016 15:29:52 -0400 Subject: [PATCH] Declare `definition` Declare `definition` in `BelongsTo.prototype.destroy` --- lib/relation-definition.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/relation-definition.js b/lib/relation-definition.js index d11e5c6c..61e18729 100644 --- a/lib/relation-definition.js +++ b/lib/relation-definition.js @@ -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();