Skip to content

Commit db0b20c

Browse files
committed
Cancel out if we're not in the right context
1 parent 05139f0 commit db0b20c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

content/editorconfig.js

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
! currentView.koDoc.file || currentView.editorConfigProcessed)
1111
return;
1212

13+
if (currentView.getAttribute("type") != "editor") return;
14+
1315
currentView.editorConfigProcessed = true;
1416

1517
var ec = Cc["@activestate.com/editorconfig/koEditorConfig;1"]
@@ -20,6 +22,7 @@
2022
try
2123
{
2224
var items = ec.get_properties(filepath);
25+
if ( ! items) return;
2326
log.debug("Setting editorconfig: " + items);
2427
items = JSON.parse(items);
2528
}

0 commit comments

Comments
 (0)