-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
Cannot set property '$this' of undefined. #111
Comments
Short update as I will have a short break (hopefully just a view hours) on working on this: |
Okay not as strange as I thought. <!-- some data-query using renderChildren e.g. view -->
<div data-query="view(Somview)">
<!-- these queries are sharing their context.childs -->
<div data-query="each(first)">{{$this}}</div>
<div data-query="each(second)">{{$this}}</div>
</div> If now one array observable gets emptied (e.g. Maybe all elements should get there own context, but this could/will lead to other problems. Let me think about a solution as this is more complex. |
Wow. This actually seems extremely complex issue. I don't have an idea how it could be fixed. If you have hard times figuring this out we could take a look at it together. Let met know. |
Sorry, I was really busy the last 3 months. |
I might have parts of a solution for this. We could remove the context.childs array. I will post here if I have any updates. |
Another idea. You could also take a look at the code before the |
Intresting enough, that's the first thing I had in mind to solve this. |
I worked on this Issue today but stumbled accross one problem, while testing within the shopping-example. |
Yeah. I kinda remember. First I wrote the method without the clearing of the It is possible another fix to have resolved this so I encourage you to remove it test it more and then push it. |
Context will now be build with the parent context, the model and the ._index array of the collection in each-queries. Resolves astoilkov#111.
I created an public branch with my current version of a fix for this. But I want to test a little bit more before I open a PR. To prevent bugs from beeing recreated we should consider to created an "issue" category in the tests with test cases for issue that are to complex or involve other components so they don't fit in the other categories. What do you think ? |
Yeah. I think this is a good idea. You could try it out and open a PR and I will review the final idea behind the tests. :) |
Found in the shopping example.
Steps to reproduce:
I have no time to spend on this today but I can look into this later this week.
The text was updated successfully, but these errors were encountered: