Shorter conditionals

This commit is contained in:
Nikolay Karev
2018-06-18 21:59:38 +05:00
committed by David Wilson
parent bed9c6966e
commit 5e3f12857f

View File

@@ -25,11 +25,8 @@ const LocationSuffixRegExp = /(:\d+)(:\d+)?$/
const getDefaultPath = () => {
const editor = atom.workspace.getActiveTextEditor()
if (!editor) {
return undefined
}
if (!editor.getPath()) {
return undefined
if (!editor || !editor.getPath()) {
return
}
const paths = atom.project.getPaths()
if (paths) {