Fix a few tiny sentry errors

This commit is contained in:
Ben Gotow 2017-11-16 20:20:00 +01:00
parent 65209c6c51
commit 2acb01fb90
2 changed files with 9 additions and 2 deletions

View file

@ -157,6 +157,9 @@ function wrapMisspelledWords(rootNode) {
let currentlyRunningSpellChecker = false;
const runSpellChecker = _.debounce(rootNode => {
if (!Spellchecker.handler) {
return;
}
currentlyRunningSpellChecker = true;
unwrapWords(rootNode);
Spellchecker.handler.provideHintText(rootNode.textContent).then(() => {

View file

@ -29,7 +29,9 @@ class QuotedHTMLTransformer {
const doc = this._parseHTML(html);
for (const el of this._findQuoteElements(doc, options)) {
el.remove();
if (el) {
el.remove();
}
}
// It's possible that the entire body was quoted text anyway and we've
@ -45,7 +47,9 @@ class QuotedHTMLTransformer {
}
for (const el of quoteStringDetector(doc)) {
el.remove();
if (el) {
el.remove();
}
}
this._removeImagesStrippedByAnotherClient(doc);