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

Commit 2ff54c0

Browse files
committed
🐛 Skip editors that do not have paths
1 parent 8cbec05 commit 2ff54c0

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)