mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Shorter conditionals
This commit is contained in:
committed by
David Wilson
parent
bed9c6966e
commit
5e3f12857f
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user