{"action":"created","issue":{"url":"https://api.github.com/repos/cubiq/add-to-homescreen/issues/162","labels_url":"https://api.github.com/repos/cubiq/add-to-homescreen/issues/162/labels{/name}","comments_url":"https://api.github.com/repos/cubiq/add-to-homescreen/issues/162/comments","events_url":"https://api.github.com/repos/cubiq/add-to-homescreen/issues/162/events","html_url":"https://github.com/cubiq/add-to-homescreen/issues/162","id":61571994,"number":162,"title":"Show method crashes when OS is unsupported","user":{"login":"martindrapeau","id":104156,"avatar_url":"https://avatars.githubusercontent.com/u/104156?v=3","gravatar_id":"","url":"https://api.github.com/users/martindrapeau","html_url":"https://github.com/martindrapeau","followers_url":"https://api.github.com/users/martindrapeau/followers","following_url":"https://api.github.com/users/martindrapeau/following{/other_user}","gists_url":"https://api.github.com/users/martindrapeau/gists{/gist_id}","starred_url":"https://api.github.com/users/martindrapeau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martindrapeau/subscriptions","organizations_url":"https://api.github.com/users/martindrapeau/orgs","repos_url":"https://api.github.com/users/martindrapeau/repos","events_url":"https://api.github.com/users/martindrapeau/events{/privacy}","received_events_url":"https://api.github.com/users/martindrapeau/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-14T11:44:38Z","updated_at":"2015-03-14T11:59:25Z","closed_at":null,"body":"I was trying to test on my laptop and show() crashes when trying to fetch the message. This piece of code does not handle `OS == \"unsupported\"`:\r\n```\r\n\t\tvar message = '';\r\n\r\n\t\tif ( this.options.message in ath.intl ) {\t\t// you can force the locale\r\n\t\t\tmessage = ath.intl[this.options.message][ath.OS];\r\n\t\t} else if ( this.options.message !== '' ) {\t\t// or use a custom message\r\n\t\t\tmessage = this.options.message;\r\n\t\t} else {\t\t\t\t\t\t\t\t\t\t// otherwise we use our message\r\n\t\t\tmessage = ath.intl[ath.language][ath.OS];\r\n\t\t}\r\n```\r\nYou should fail gracefully or default to `\"ios\"`. Not sure what the best course of action is here."},"comment":{"url":"https://api.github.com/repos/cubiq/add-to-homescreen/issues/comments/80379138","html_url":"https://github.com/cubiq/add-to-homescreen/issues/162#issuecomment-80379138","issue_url":"https://api.github.com/repos/cubiq/add-to-homescreen/issues/162","id":80379138,"user":{"login":"cubiq","id":427614,"avatar_url":"https://avatars.githubusercontent.com/u/427614?v=3","gravatar_id":"","url":"https://api.github.com/users/cubiq","html_url":"https://github.com/cubiq","followers_url":"https://api.github.com/users/cubiq/followers","following_url":"https://api.github.com/users/cubiq/following{/other_user}","gists_url":"https://api.github.com/users/cubiq/gists{/gist_id}","starred_url":"https://api.github.com/users/cubiq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cubiq/subscriptions","organizations_url":"https://api.github.com/users/cubiq/orgs","repos_url":"https://api.github.com/users/cubiq/repos","events_url":"https://api.github.com/users/cubiq/events{/privacy}","received_events_url":"https://api.github.com/users/cubiq/received_events","type":"User","site_admin":false},"created_at":"2015-03-14T11:59:25Z","updated_at":"2015-03-14T11:59:25Z","body":"I've got the gist and 100% agree. thanks for the report."}}