不要怂,就是干,撸起袖子干!

Commit 36c8afea by Mick Hansen

fix: don't assume options is set in belongsTo setter

1 parent 1b856565
Showing with 2 additions and 0 deletions
......@@ -121,6 +121,8 @@ module.exports = (function() {
var association = this;
instancePrototype[this.accessors.set] = function(associatedInstance, options) {
options = options || {};
var value = associatedInstance;
if (associatedInstance instanceof association.target.Instance) {
value = associatedInstance[association.targetIdentifier];
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!