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

Fix DI bug with view prototype inheritance #6

Merged
merged 1 commit into from
Sep 3, 2014

Conversation

maximkoretskiy
Copy link
Collaborator

No description provided.

@maximkoretskiy maximkoretskiy force-pushed the feature/fix_di_prototype_bug branch from e23da53 to 8e639ad Compare August 27, 2014 19:43
@@ -54,4 +54,10 @@ describe "Check MixinBackbone DI",->
view2 = @view.getViewDI @TestViewDI
expect(view2?._$_p?.removeFlag).toBe false

it "correct work with prototype inheritance", ->
ParentView = Backbone.View.extend {}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testcase isn't correct. Parentview and Childview are always have different proyotypes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be You mean that they should be different? In fact you can create some view with some basic functionality and extend it in another view. And it is normal usecase. If You try to use DI while work with this views, DI will always return only the first one.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Problem only with testcase. If revert logic functionality test will be pass. Testcase test nothing, i think. I can mistake, because can't check anythink at this moment, but my "brain intepreter" says that testcase should fails without fixing this bug.

@lexich lexich merged commit 8e639ad into lexich:master Sep 3, 2014
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