Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call the itemViewContainer in the context of the CompositeView #841

Merged

Conversation

TheCloudlessSky
Copy link
Contributor

If itemViewContainer is specified as a function, it is called in the global context, which isn't cool. This fixes this issue by ensuring that the itemViewContainer is called in the context of the CompositeView.

@samccone
Copy link
Member

samccone commented Jan 7, 2014

ah nice, @TheCloudlessSky can you as a test for this?

@TheCloudlessSky
Copy link
Contributor Author

Sure thing. There wasn't any tests about itemViewContainer being a function, so I wasn't initially sure. Additionally, it seems that Jasmine doesn't have a toBeCalledOn to validate the context of a spy (Sinon.JS has this feature). So, I had to manually check the context of the function (which was done throughout other specs too).

@samccone
Copy link
Member

samccone commented Jan 7, 2014

cool thanks @TheCloudlessSky mind squashing the commit down into 1 then i think we will be good to go 🚢

Add tests for calling `itemViewContainer` in context of composite view.

Call the `itemViewContainer` with the current context.
@TheCloudlessSky
Copy link
Contributor Author

Sure thing.

samccone added a commit that referenced this pull request Jan 8, 2014
Call the itemViewContainer in the context of the CompositeView
@samccone samccone merged commit 871083d into marionettejs:master Jan 8, 2014
@TheCloudlessSky TheCloudlessSky deleted the itemViewContainer-context branch January 8, 2014 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants