   # Automatic conversion, based on scope
   autoConvert: ->
     editor = @workspace.getActiveTextEditor()
+    if typeof editor is "undefined"
+      @atom.beep()
+      return
     scope = editor.getGrammar().scopeName
 
     if scope is "source.coffee"

  # Convert Atom snippet format (CSON to JSON, or vice versa)
  atomToAtom: ->
    editor = @workspace.getActiveTextEditor()
    scope = editor.getGrammar().scopeName

    # Automatic conversion, based on scope

  # Convert Atom snippet into Sublime Text completion
  atomToSubl: ->
    editor = @workspace.getActiveTextEditor()
    if typeof editor is "undefined"
      @atom.beep()
      return
    text = editor.getText()

    obj = CSON.parseCSONString(text)
