Skip to content

Commit

Permalink
Fix tests; order of operations is hard
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamil Tusznio committed Jan 2, 2012
1 parent 1524a24 commit 26a8b7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/batman.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/batman.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2851,7 +2851,8 @@ class Batman.BelongsToAssociation extends Batman.SingularAssociation

apply: (base) ->
if model = base.get(@label)
if foreignValue = model.get(@foreignKey) isnt undefined
foreignValue = model.get(@foreignKey)
if foreignValue isnt undefined
base.set @localKey, foreignValue

class Batman.HasOneAssociation extends Batman.SingularAssociation
Expand Down

0 comments on commit 26a8b7b

Please sign in to comment.