{"action":"created","issue":{"url":"https://api.github.com/repos/meteor/meteor/issues/4386","labels_url":"https://api.github.com/repos/meteor/meteor/issues/4386/labels{/name}","comments_url":"https://api.github.com/repos/meteor/meteor/issues/4386/comments","events_url":"https://api.github.com/repos/meteor/meteor/issues/4386/events","html_url":"https://github.com/meteor/meteor/issues/4386","id":76269030,"number":4386,"title":"Template.instance() does not work in data context functions and accross Spacebars.dot","user":{"login":"mitar","id":585279,"avatar_url":"https://avatars.githubusercontent.com/u/585279?v=3","gravatar_id":"","url":"https://api.github.com/users/mitar","html_url":"https://github.com/mitar","followers_url":"https://api.github.com/users/mitar/followers","following_url":"https://api.github.com/users/mitar/following{/other_user}","gists_url":"https://api.github.com/users/mitar/gists{/gist_id}","starred_url":"https://api.github.com/users/mitar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitar/subscriptions","organizations_url":"https://api.github.com/users/mitar/orgs","repos_url":"https://api.github.com/users/mitar/repos","events_url":"https://api.github.com/users/mitar/events{/privacy}","received_events_url":"https://api.github.com/users/mitar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/meteor/meteor/labels/Project:Blaze","name":"Project:Blaze","color":"eb6420"},{"url":"https://api.github.com/repos/meteor/meteor/labels/pull-requests-encouraged","name":"pull-requests-encouraged","color":"e102d8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-14T07:37:57Z","updated_at":"2015-05-19T21:56:00Z","closed_at":null,"body":"`Template.instance()` does not work in functions defined in the data context. Moreover, it does not work when accessing a field using a dot operator, so in `{{something.foobar}}`, `something` has access to `Template.instance()`, but `foobar` does not.\r\n\r\nThis makes any more complicated functions and libraries of functions not be able to access current template instance.\r\n\r\nSee the reproduction here: https://github.com/mitar/meter-issue4386\r\n\r\nThe output is:\r\n\r\n```\r\nFound template instance: false.\r\nFound template instance: false.\r\nFound template instance: true.\r\nFound template instance: false.\r\nFound template instance: false.\r\n```\r\n\r\nBut expected output is:\r\n\r\n```\r\nFound template instance: true.\r\nFound template instance: true.\r\nFound template instance: true.\r\nFound template instance: true.\r\nFound template instance: true.\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/meteor/meteor/issues/comments/103679328","html_url":"https://github.com/meteor/meteor/issues/4386#issuecomment-103679328","issue_url":"https://api.github.com/repos/meteor/meteor/issues/4386","id":103679328,"user":{"login":"glasser","id":16724,"avatar_url":"https://avatars.githubusercontent.com/u/16724?v=3","gravatar_id":"","url":"https://api.github.com/users/glasser","html_url":"https://github.com/glasser","followers_url":"https://api.github.com/users/glasser/followers","following_url":"https://api.github.com/users/glasser/following{/other_user}","gists_url":"https://api.github.com/users/glasser/gists{/gist_id}","starred_url":"https://api.github.com/users/glasser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glasser/subscriptions","organizations_url":"https://api.github.com/users/glasser/orgs","repos_url":"https://api.github.com/users/glasser/repos","events_url":"https://api.github.com/users/glasser/events{/privacy}","received_events_url":"https://api.github.com/users/glasser/received_events","type":"User","site_admin":false},"created_at":"2015-05-19T21:56:00Z","updated_at":"2015-05-19T21:56:00Z","body":"Thanks, these should all work.  Pull requests encouraged!"}}