Skip to content

Commit

Permalink
Fix flashing regexp (Fix #145)
Browse files Browse the repository at this point in the history
  • Loading branch information
uu59 committed Jan 28, 2015
1 parent 38ec948 commit 61ec84f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/assets/javascripts/vue/in_tail_format.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,12 @@
},

preview: function(){
if(this.previewAjax) {
this.previewAjax.abort();
}
var self = this;
new Promise(function(resolve, reject) {
$.ajax({
self.previewAjax = $.ajax({
method: "POST",
url: "/api/regexp_preview",
data: {
Expand All @@ -137,7 +140,9 @@
self.regexpMatches = result.matches;
self.updateHighlightedLines();
})["catch"](function(error){
console.error(error.stack);
if(error.stack) {
console.error(error.stack);
}
});
},
}
Expand Down

0 comments on commit 61ec84f

Please sign in to comment.