Skip to content

Commit

Permalink
Consistently operate on result.pathToOpen
Browse files Browse the repository at this point in the history
  • Loading branch information
smashwilson committed Apr 19, 2019
1 parent d3bb28f commit 2811682
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main-process/atom-application.js
Original file line number Diff line number Diff line change
Expand Up @@ -1438,11 +1438,11 @@ class AtomApplication extends EventEmitter {
return result
}

pathToOpen = pathToOpen.replace(/[:\s]+$/, '')
const match = pathToOpen.match(LocationSuffixRegExp)
result.pathToOpen = result.pathToOpen.replace(/[:\s]+$/, '')
const match = result.pathToOpen.match(LocationSuffixRegExp)

if (match != null) {
result.pathToOpen = pathToOpen.slice(0, -match[0].length)
result.pathToOpen = result.pathToOpen.slice(0, -match[0].length)
if (match[1]) {
result.initialLine = Math.max(0, parseInt(match[1].slice(1), 10) - 1)
}
Expand Down

0 comments on commit 2811682

Please sign in to comment.