FIX: handle expanding quotes from deleted posts by rendering a trash icon

This commit is contained in:
Neil Lalonde 2017-04-12 16:44:16 -04:00
parent ff6a98183f
commit 07d596ea05
1 changed files with 4 additions and 0 deletions

View File

@ -136,6 +136,10 @@ export default class PostCooked {
div.html(result.cooked);
div.highlight(originalText, {caseSensitive: true, element: 'span', className: 'highlighted'});
$blockQuote.showHtml(div, 'fast', finished);
}).catch((e) => {
if (e.jqXHR.status === 404) {
$blockQuote.showHtml($("<div class='expanded-quote'><i class='fa fa-trash-o'></i></div>"), 'fast', finished);
}
});
} else {
// Hide expanded quote