{"action":"created","issue":{"url":"https://api.github.com/repos/espadrine/fleau/issues/1","labels_url":"https://api.github.com/repos/espadrine/fleau/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/espadrine/fleau/issues/1/comments","events_url":"https://api.github.com/repos/espadrine/fleau/issues/1/events","html_url":"https://github.com/espadrine/fleau/issues/1","id":69576865,"number":1,"title":"`if` macro throws when a value is not defined","user":{"login":"jankeromnes","id":599268,"avatar_url":"https://avatars.githubusercontent.com/u/599268?v=3","gravatar_id":"","url":"https://api.github.com/users/jankeromnes","html_url":"https://github.com/jankeromnes","followers_url":"https://api.github.com/users/jankeromnes/followers","following_url":"https://api.github.com/users/jankeromnes/following{/other_user}","gists_url":"https://api.github.com/users/jankeromnes/gists{/gist_id}","starred_url":"https://api.github.com/users/jankeromnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jankeromnes/subscriptions","organizations_url":"https://api.github.com/users/jankeromnes/orgs","repos_url":"https://api.github.com/users/jankeromnes/repos","events_url":"https://api.github.com/users/jankeromnes/events{/privacy}","received_events_url":"https://api.github.com/users/jankeromnes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-20T12:32:40Z","updated_at":"2015-04-20T21:16:10Z","closed_at":null,"body":"Scenario:\r\n\r\n    <title> Hello {{if title then {{ | }}}}</title>\r\n    \r\n    { }\r\n\r\nExpected:\r\n\r\n    <title> Hello </title>\r\n\r\nActual (Fleau throws this error):\r\n\r\n    Error: Template error: macro \"if\" didn't work.\r\n    Parameters: title,then, | \r\n    Literal: {}\r\n    Message: title is not defined\r\n        at Error (native)\r\n        at eval (eval at <anonymous> (/path/to/fleau.js:169:12), <anonymous>:73:9)"},"comment":{"url":"https://api.github.com/repos/espadrine/fleau/issues/comments/94570825","html_url":"https://github.com/espadrine/fleau/issues/1#issuecomment-94570825","issue_url":"https://api.github.com/repos/espadrine/fleau/issues/1","id":94570825,"user":{"login":"espadrine","id":100689,"avatar_url":"https://avatars.githubusercontent.com/u/100689?v=3","gravatar_id":"","url":"https://api.github.com/users/espadrine","html_url":"https://github.com/espadrine","followers_url":"https://api.github.com/users/espadrine/followers","following_url":"https://api.github.com/users/espadrine/following{/other_user}","gists_url":"https://api.github.com/users/espadrine/gists{/gist_id}","starred_url":"https://api.github.com/users/espadrine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/espadrine/subscriptions","organizations_url":"https://api.github.com/users/espadrine/orgs","repos_url":"https://api.github.com/users/espadrine/repos","events_url":"https://api.github.com/users/espadrine/events{/privacy}","received_events_url":"https://api.github.com/users/espadrine/received_events","type":"User","site_admin":false},"created_at":"2015-04-20T21:16:10Z","updated_at":"2015-04-20T21:16:10Z","body":"Trying to guess beforehand what variables you will expect from the literal (but aren't in it) is way expensive.\r\n\r\nFrom a usability standpoint, `if` is meant to take booleans as conditions. Any other use is a hack. In the current implementation, even `{title:undefined}` would work.\r\n\r\nIf you want, I can specify in the documentation that you can't use variables that were never referenced in the literal. I expected it to be obvious, as it doesn't work in regular JS either.\r\n\r\n```js\r\n> if (title) { console.log(title); }\r\nReferenceError: title is not defined\r\n```"}}