{"action":"created","issue":{"url":"https://api.github.com/repos/vingorius/jade-beautify/issues/3","labels_url":"https://api.github.com/repos/vingorius/jade-beautify/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/vingorius/jade-beautify/issues/3/comments","events_url":"https://api.github.com/repos/vingorius/jade-beautify/issues/3/events","html_url":"https://github.com/vingorius/jade-beautify/issues/3","id":110363882,"number":3,"title":"Uncaught TypeError: Cannot read property 'getPath' of undefined","user":{"login":"madole","id":3341965,"avatar_url":"https://avatars.githubusercontent.com/u/3341965?v=3","gravatar_id":"","url":"https://api.github.com/users/madole","html_url":"https://github.com/madole","followers_url":"https://api.github.com/users/madole/followers","following_url":"https://api.github.com/users/madole/following{/other_user}","gists_url":"https://api.github.com/users/madole/gists{/gist_id}","starred_url":"https://api.github.com/users/madole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madole/subscriptions","organizations_url":"https://api.github.com/users/madole/orgs","repos_url":"https://api.github.com/users/madole/repos","events_url":"https://api.github.com/users/madole/events{/privacy}","received_events_url":"https://api.github.com/users/madole/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-08T03:08:28Z","updated_at":"2015-12-28T06:47:32Z","closed_at":null,"body":"\r\n1. Install git-projects\r\n2. Ctrl+Alt+O \r\n3. Jade Error appears\r\n\r\nI know it sounds unrelated, but that's the reproducible steps \r\n\r\n**Atom Version**: 1.0.19\r\n**System**: Ubuntu 15.04\r\n**Thrown From**: [jade-beautify](https://github.com/vingorius/jade-beautify) package, v0.0.11\r\n\r\n\r\n### Stack Trace\r\n\r\nUncaught TypeError: Cannot read property 'getPath' of undefined\r\n\r\n```\r\nAt /home/andrew/.atom/packages/jade-beautify/lib/jade-beautify.js:37\r\n\r\nTypeError: Cannot read property 'getPath' of undefined\r\n  at Object.jadeBeautify.isJadeFile (/home/andrew/.atom/packages/jade-beautify/lib/jade-beautify.js:37:42)\r\n  at atom-workspace.jadeBeautify.convert (/home/andrew/.atom/packages/jade-beautify/lib/jade-beautify.js:53:21)\r\n  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:245:29)\r\n  at /usr/share/atom/resources/app.asar/src/command-registry.js:3:61\r\n  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:524:16)\r\n  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:347:22)\r\n  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/usr/share/atom/resources/app.asar/src/window-event-handler.js:184:20)\r\n\r\n```\r\n\r\n### Commands\r\n\r\n```\r\n  3x -0:42.9.0 incompatible-packages:view (div.incompatible-packages-status.inline-block.text.text-error)\r\n     -0:01.0 jade-beautify:convert (div.incompatible-packages.padded.native-key-bindings)\r\n```\r\n\r\n### Config\r\n\r\n```json\r\n{\r\n  \"core\": {\r\n    \"autoHideMenuBar\": true\r\n  }\r\n}\r\n```\r\n\r\n### Installed Packages\r\n\r\n```coffee\r\n# User\r\nStylus, v1.2.1\r\natom-jade, v0.3.0\r\ncolor-picker, v2.0.13\r\neditor-stats, v0.17.0\r\neditorconfig, v1.2.0\r\nemmet, v2.3.13\r\nfile-icons, v1.6.9\r\nformatter-coffeescript, v0.1.1\r\ngrunt-runner, v0.11.0\r\nhighlight-line, v0.11.0\r\njade-beautify, v0.0.11\r\njavascript-snippets, v1.0.0\r\nlinter, v1.8.1\r\nlinter-coffeescript, v1.0.0\r\nlinter-stylint, v2.0.1\r\nmarkdown-preview-plus, v2.2.0\r\nminimap, v4.13.4\r\nminimap-pigments, v0.1.7\r\npigments, v0.15.0\r\nterminal-status, v1.6.8\r\n\r\n# Dev\r\nNo dev packages\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/vingorius/jade-beautify/issues/comments/167495318","html_url":"https://github.com/vingorius/jade-beautify/issues/3#issuecomment-167495318","issue_url":"https://api.github.com/repos/vingorius/jade-beautify/issues/3","id":167495318,"user":{"login":"vingorius","id":5274928,"avatar_url":"https://avatars.githubusercontent.com/u/5274928?v=3","gravatar_id":"","url":"https://api.github.com/users/vingorius","html_url":"https://github.com/vingorius","followers_url":"https://api.github.com/users/vingorius/followers","following_url":"https://api.github.com/users/vingorius/following{/other_user}","gists_url":"https://api.github.com/users/vingorius/gists{/gist_id}","starred_url":"https://api.github.com/users/vingorius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vingorius/subscriptions","organizations_url":"https://api.github.com/users/vingorius/orgs","repos_url":"https://api.github.com/users/vingorius/repos","events_url":"https://api.github.com/users/vingorius/events{/privacy}","received_events_url":"https://api.github.com/users/vingorius/received_events","type":"User","site_admin":false},"created_at":"2015-12-28T06:47:32Z","updated_at":"2015-12-28T06:47:32Z","body":"I guess,it may be happened on Ubuntu or Mac.\r\nAnd pointed out from @jerone, I'll change code like below.\r\n\r\nif(atom.workspace.getActiveTextEditor() === undefined) return false;\r\n\r\nIn my ubuntu machine, i'll test it no far from now. but it's a long holiday!!!"}}