Merge pull request #601 from slonoed/master
Fix ReferenceError: definition is not defined
This commit is contained in:
commit
949054334c
|
@ -1753,6 +1753,7 @@ HasOne.prototype.destroy = function (options, cb) {
|
|||
options = {};
|
||||
}
|
||||
cb = cb || utils.createPromiseCallback();
|
||||
var definition = this.definition;
|
||||
this.fetch(function(err, targetModel) {
|
||||
if (targetModel instanceof ModelBaseClass) {
|
||||
targetModel.destroy(options, cb);
|
||||
|
|
Loading…
Reference in New Issue