This commit is contained in:
Corey Johnson & Nathan Sobo
2012-07-12 18:00:18 -06:00
parent 8e3c3a13a9
commit f02e724606

View File

@@ -27,7 +27,7 @@ module.exports =
editor.on 'snippets:expand', (e) =>
editSession = editor.activeEditSession
prefix = editSession.getLastCursor().getCurrentWordPrefix()
if snippet = @snippetsByExtension[editSession.getFileExtension()][prefix]
if snippet = @snippetsByExtension[editSession.getFileExtension()]?[prefix]
editSession.transact ->
snippetExpansion = new SnippetExpansion(snippet, editSession)
editSession.snippetExpansion = snippetExpansion