Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Commit 03cc3e9

Browse files
authored
Merge pull request #53 from execjosh/bugfix-empty-editor-path
Skip editors that do not have paths
2 parents 8cbec05 + 2ff54c0 commit 03cc3e9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/file-types.coffee

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ module.exports =
6767
@_off.push atom.grammars.onDidUpdateGrammar updateEditorGrammars
6868

6969
_tryToSetGrammar: (editor) ->
70-
filename = basename editor.getPath()
70+
fullPath = editor.getPath()
71+
return unless fullPath?
72+
filename = basename fullPath
7173
scopeName = @snp.getScopeName filename
7274
unless scopeName?
7375
@_log "no custom scopeName for #{filename}...skipping"

0 commit comments

Comments
 (0)