Closed rjsmith closed 9 years ago
Yes, because that are lexical scopes and not data context. MDG decided to implement something new, called lexical scope. So lexical scope is not visible through data context. I think this is a bad design, but they are saying it is good. :-) (I think data context should represent anything which developer sees in the template, in my view.)
See https://github.com/peerlibrary/meteor-blaze-components/issues/76 and https://github.com/meteor/meteor/issues/5280.
BTW, can you create a small reproduction here? So some other template which uses each ... in
which is not a Blaze Component and which stops working once Blaze Components are added?
Hm, maybe the issue is lookup.js file. Can you try removing it (it should not be needed in 1.2 anymore) and see if it works?
Hi, Thanks for the swift reply. Did you look at the meteorpad I linked to? The leaderboard templates do not use blaze components .. simply removing the blaze components package resolves the problem.
re: removing lookup.js. Sorry, not sure how to do that .. would I have to install blaze components locally, then remove the file? As I said, I've only come across this problem because I really wanted to use easy:search (which just happens to use blaze components)
On Tuesday, 27 October 2015, Mitar notifications@github.com wrote:
Hm, maybe the issue is lookup.js file https://github.com/peerlibrary/meteor-blaze-components/blob/master/lookup.js. Can you try removing it (it should not be needed in 1.2 anymore) and see if it works?
— Reply to this email directly or view it on GitHub https://github.com/peerlibrary/meteor-blaze-components/issues/100#issuecomment-151628870 .
+1 we just updated to easy-search v2.0 which uses this package as a dependency and this bug has caused parts of our application that use each..in
to break!
Released 0.15.1 with a fix 5ed74a121205b8d6459c183250fcb0de5a403ede. meteor update
should probably fix the issue for you now?
Simply adding peerlibrary:blaze-components to a Meteor v1.2 application seems to break the {{#each foo in getFoos}} block helper aded in Meteor v1.2 ... the
foo
field does not get set in the data context inside the each block.See this meteorpad (using blaze-components 0.13.0, but I just verified that exactly the same thing happens with current 0.15.0). It's the standard leaderboard app, but using #each .. in ..
http://meteorpad.com/pad/wCpsPdyfrHTnDm8gf/BlazeComponents
If you remove BlazeComponents, the each block works again.
PS> I don't use blaze components myself, but spotted the problem after adding
easy:search
package to my application yesterday. Someone else has spotted this problem also there.