mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Default for Template.parentData set to 1.
This commit is contained in:
@@ -128,6 +128,10 @@ Blaze.View.prototype.lookup = function (name, _options) {
|
||||
// Implement Spacebars' {{../..}}.
|
||||
// @param height {Number} The number of '..'s
|
||||
Blaze._parentData = function (height, _functionWrapped) {
|
||||
// If height is null or undefined, we default to 1, the first parent.
|
||||
if (height == null) {
|
||||
height = 1;
|
||||
}
|
||||
var theWith = Blaze.getView('with');
|
||||
for (var i = 0; (i < height) && theWith; i++) {
|
||||
theWith = Blaze.getView(theWith, 'with');
|
||||
|
||||
Reference in New Issue
Block a user