Skip to content

Commit

Permalink
fix(compilation): set target to source text on compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
CaryLandholt committed Aug 18, 2014
1 parent e4c8fd5 commit 7ccf15f
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions lib/NgClassifyPreviewView.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,13 @@ class PreviewView extends EditorView
if cEditor?
@trigger 'title-changed'

text = cEditor.getText()

try
compiled = ngClassify text
compiled = compiled + '\n'
text = cEditor.getText()

@previewEditor.setText compiled
try
output = ngClassify text
catch error
return

output = text
finally
@previewEditor.setText output + '\n'

module.exports = PreviewView

0 comments on commit 7ccf15f

Please sign in to comment.