Skip to content

Commit

Permalink
Merge pull request #146 from fluent/fix_flashing_regexp
Browse files Browse the repository at this point in the history
Fix flashing regexp (Fix #145)
  • Loading branch information
uu59 committed Jan 28, 2015
2 parents 38ec948 + 61ec84f commit db79a91
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 db79a91

Please sign in to comment.