{"action":"created","issue":{"url":"https://api.github.com/repos/ractivejs/ractive/issues/1879","labels_url":"https://api.github.com/repos/ractivejs/ractive/issues/1879/labels{/name}","comments_url":"https://api.github.com/repos/ractivejs/ractive/issues/1879/comments","events_url":"https://api.github.com/repos/ractivejs/ractive/issues/1879/events","html_url":"https://github.com/ractivejs/ractive/issues/1879","id":64793610,"number":1879,"title":"A bug of elseif","user":{"login":"jimmyye","id":490380,"avatar_url":"https://avatars.githubusercontent.com/u/490380?v=3","gravatar_id":"","url":"https://api.github.com/users/jimmyye","html_url":"https://github.com/jimmyye","followers_url":"https://api.github.com/users/jimmyye/followers","following_url":"https://api.github.com/users/jimmyye/following{/other_user}","gists_url":"https://api.github.com/users/jimmyye/gists{/gist_id}","starred_url":"https://api.github.com/users/jimmyye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimmyye/subscriptions","organizations_url":"https://api.github.com/users/jimmyye/orgs","repos_url":"https://api.github.com/users/jimmyye/repos","events_url":"https://api.github.com/users/jimmyye/events{/privacy}","received_events_url":"https://api.github.com/users/jimmyye/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ractivejs/ractive/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-27T16:06:36Z","updated_at":"2015-04-07T23:08:14Z","closed_at":null,"body":"fiddle: http://jsfiddle.net/yue3tLoa/1/\r\n\r\n```\r\nr.set('list2', [1]);\r\nr.set('list', [{a: false, b: true}]);\r\n//r.set('list2', [1]);\r\n```\r\n\r\n```\r\n    {{#each list2}}\r\n        {{#if list[@index].a }}\r\n            <div>list[{{@index}}].a is true</div>\r\n        {{elseif list[@index].b }}\r\n            <div>list[{{@index}}].b is true</div>\r\n        {{/if}}\r\n    {{/each}}\r\n```\r\n\r\nWhen set list2 before list, an error occurs: Failed to compute \"${_1-0--b}\"\r\nonly when `elseif` is in an `each` block."},"comment":{"url":"https://api.github.com/repos/ractivejs/ractive/issues/comments/90755711","html_url":"https://github.com/ractivejs/ractive/issues/1879#issuecomment-90755711","issue_url":"https://api.github.com/repos/ractivejs/ractive/issues/1879","id":90755711,"user":{"login":"Madgvox","id":7494949,"avatar_url":"https://avatars.githubusercontent.com/u/7494949?v=3","gravatar_id":"","url":"https://api.github.com/users/Madgvox","html_url":"https://github.com/Madgvox","followers_url":"https://api.github.com/users/Madgvox/followers","following_url":"https://api.github.com/users/Madgvox/following{/other_user}","gists_url":"https://api.github.com/users/Madgvox/gists{/gist_id}","starred_url":"https://api.github.com/users/Madgvox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Madgvox/subscriptions","organizations_url":"https://api.github.com/users/Madgvox/orgs","repos_url":"https://api.github.com/users/Madgvox/repos","events_url":"https://api.github.com/users/Madgvox/events{/privacy}","received_events_url":"https://api.github.com/users/Madgvox/received_events","type":"User","site_admin":false},"created_at":"2015-04-07T23:08:14Z","updated_at":"2015-04-07T23:08:14Z","body":"Did some further investigating, when the computation is called it's not passing the value of `list` into the function getter, only the value of `@index`. I'm not familiar enough with the code to immediately know why that's happening, but I'm going to keep poking at it."}}