{"action":"created","issue":{"url":"https://api.github.com/repos/vuejs/vue/issues/5998","repository_url":"https://api.github.com/repos/vuejs/vue","labels_url":"https://api.github.com/repos/vuejs/vue/issues/5998/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vue/issues/5998/comments","events_url":"https://api.github.com/repos/vuejs/vue/issues/5998/events","html_url":"https://github.com/vuejs/vue/issues/5998","id":239475919,"node_id":"MDU6SXNzdWUyMzk0NzU5MTk=","number":5998,"title":"`this` undefined in filters","user":{"login":"callumacrae","id":472830,"node_id":"MDQ6VXNlcjQ3MjgzMA==","avatar_url":"https://avatars0.githubusercontent.com/u/472830?v=4","gravatar_id":"","url":"https://api.github.com/users/callumacrae","html_url":"https://github.com/callumacrae","followers_url":"https://api.github.com/users/callumacrae/followers","following_url":"https://api.github.com/users/callumacrae/following{/other_user}","gists_url":"https://api.github.com/users/callumacrae/gists{/gist_id}","starred_url":"https://api.github.com/users/callumacrae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/callumacrae/subscriptions","organizations_url":"https://api.github.com/users/callumacrae/orgs","repos_url":"https://api.github.com/users/callumacrae/repos","events_url":"https://api.github.com/users/callumacrae/events{/privacy}","received_events_url":"https://api.github.com/users/callumacrae/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-06-29T13:18:46Z","updated_at":"2018-08-10T08:42:51Z","closed_at":"2017-06-29T13:25:18Z","author_association":"NONE","body":"### Version\r\n2.3.4\r\n\r\n### Reproduction link\r\n[https://jsfiddle.net/xweeqtuw/1/](https://jsfiddle.net/xweeqtuw/1/)\r\n\r\n### Steps to reproduce\r\nopen the fiddle\r\n\r\n### What is expected?\r\n`this` to be the component\r\n\r\n### What is actually happening?\r\n`this` is undefined in commonJS and `window` in jsfiddle.\r\n\r\n---\r\n\r\nIs this intentional, or should `this` be the component? I'd expect it to be the component.\r\n\r\nIs this a good candidate for my first PR? 😄 \r\n\r\n<!-- generated by vue-issues. DO NOT REMOVE -->"},"comment":{"url":"https://api.github.com/repos/vuejs/vue/issues/comments/412017914","html_url":"https://github.com/vuejs/vue/issues/5998#issuecomment-412017914","issue_url":"https://api.github.com/repos/vuejs/vue/issues/5998","id":412017914,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjAxNzkxNA==","user":{"login":"uiii","id":179219,"node_id":"MDQ6VXNlcjE3OTIxOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/179219?v=4","gravatar_id":"","url":"https://api.github.com/users/uiii","html_url":"https://github.com/uiii","followers_url":"https://api.github.com/users/uiii/followers","following_url":"https://api.github.com/users/uiii/following{/other_user}","gists_url":"https://api.github.com/users/uiii/gists{/gist_id}","starred_url":"https://api.github.com/users/uiii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uiii/subscriptions","organizations_url":"https://api.github.com/users/uiii/orgs","repos_url":"https://api.github.com/users/uiii/repos","events_url":"https://api.github.com/users/uiii/events{/privacy}","received_events_url":"https://api.github.com/users/uiii/received_events","type":"User","site_admin":false},"created_at":"2018-08-10T08:42:51Z","updated_at":"2018-08-10T08:42:51Z","author_association":"NONE","body":"Yes I agree, there should be an option to use vue context in the filter, similar to child components. E.g. to be able to access parent component. I don't see the reason why filters should be pure functions. The pipe syntax looks better and is more readable than method calling, e.g. in number formatting where I need to access locale set on parent component: `{{price | currency}}` vs. `{{currency(price)}}`"}}
{"actor":{"display_login":"uiii"}}