From e66ff70ac495cf011280574f331a1d918c5842f6 Mon Sep 17 00:00:00 2001 From: josdejong Date: Wed, 6 May 2020 11:51:15 +0200 Subject: [PATCH] Remove some old code from getInnerText --- src/utils/domUtils.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/utils/domUtils.js b/src/utils/domUtils.js index 62bf215..b26721a 100644 --- a/src/utils/domUtils.js +++ b/src/utils/domUtils.js @@ -5,8 +5,7 @@ * @return {String} innerText */ export function getInnerText (element, buffer) { - const first = (buffer === undefined) - if (first) { + if (buffer === undefined) { buffer = { 'text': '', 'flush': function () { @@ -54,16 +53,6 @@ export function getInnerText (element, buffer) { return innerText } - else { - if (element.nodeName === 'P' && getInternetExplorerVersion() !== -1) { - // On Internet Explorer, a

with hasChildNodes()==false is - // rendered with a new line. Note that a

with - // hasChildNodes()==true is rendered without a new line - // Other browsers always ensure there is a
inside the

, - // and if not, the

does not render a new line - return buffer.flush() - } - } // br or unknown return ''