eslint: Fix unicorn/prefer-text-content.

https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/prefer-text-content.md

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2020-10-07 01:15:47 -07:00
committed by Tim Abbott
parent bd05f1c9f8
commit 70a0260ac1
6 changed files with 14 additions and 14 deletions

View File

@@ -815,7 +815,7 @@ exports.initialize = function () {
// wrong.
for (let x = 0; x < this.childNodes.length; x += 1) {
if (this.childNodes[x].nodeType !== 3) {
this.innerText = this.innerText.replace(/\n/, "");
this.textContent = this.textContent.replace(/\n/, "");
break;
}
}