 
   pistachio:->
     {error} = @getData()
-    line = if error.location then "at line: #{error.location.last_line+1}" else ""
+    line    = if error.location then "at line: #{error.location.last_line+1}" else ""
+    stack   = if error.stack? then """
+      <div class='stack'>
+        <h2>Full Stack</h2>
+        <pre>#{error.stack}</pre>
+      </div>
+    """ else ""
+
     """
       {h1{#(error.name)}}
       <pre>#{error.message} #{line}</pre>
-      <div class='stack'>
-        <h2>Full Stack</h2>
-        {pre{#(error.stack)}}
-      </div>
+      #{stack}
     """
 
   click:-> @setClass 'in'
              name              : "finder"
              editor            : "JSEditor"
              handleFileOpen    : (file, content) =>
                # log file, content
                panes = @workspace.activePanel.panesByName
                switch FSItem.getFileExtension file.path
                  when 'css', 'styl'
                  then panes.CSSEditor.openFile file, content
                  else panes.JSEditor.openFile file, content
            }
            {
              type              : "split"

    @_inprogress = yes

    {JSEditor, PreviewPane} = @workspace.activePanel.panesByName
    editorData = JSEditor.getData()
    extension = if editorData then editorData.getExtension() else 'coffee'

    if extension not in ['js', 'coffee']
      @_inprogress = no
      pc = PreviewPane.container
      pc.destroySubViews()
      pc.addSubView new ErrorPaneWidget {},
        error     :
          name    : "Preview not supported"
          message : "You can only preview .coffee and .js files."
      return

    @compiler (coffee)=>
