Merge pull request #146 from fluent/fix_flashing_regexp

Fix flashing regexp (Fix #145)
This commit is contained in:
uu59 2015-01-28 14:56:05 +09:00
commit db79a91345

View File

@ -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: {
@ -137,7 +140,9 @@
self.regexpMatches = result.matches;
self.updateHighlightedLines();
})["catch"](function(error){
if(error.stack) {
console.error(error.stack);
}
});
},
}