Set the project path is the represented file path if undefined for item

This prevents exceptions on the browser process from passing a null
argument over IPC.
This commit is contained in:
Nathan Sobo
2014-09-29 11:21:33 -06:00
parent be7d093a4a
commit 19ff2bd986

View File

@@ -139,7 +139,7 @@ class Workspace extends Model
if projectPath = atom.project?.getPath()
if item = @getActivePaneItem()
document.title = "#{item.getTitle?() ? 'untitled'} - #{projectPath}"
atom.setRepresentedFilename(item.getPath?())
atom.setRepresentedFilename(item.getPath?() ? projectPath)
else
document.title = projectPath
atom.setRepresentedFilename(projectPath)