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

Commit 31844ef

Browse files
committed
Don't run Isort if atom.workspace.getActiveEditor() is null
This should fix #2
1 parent f0ea84b commit 31844ef

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/python-isort.coffee

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ class PythonIsort
77

88
checkForPythonContext: ->
99
editor = atom.workspace.getActiveEditor()
10+
if not editor?
11+
return false
1012
return editor.getGrammar().name == 'Python'
1113

1214
removeStatusbarItem: ->

0 commit comments

Comments
 (0)