From 14bc1051a336b532914a737adc429e520bfccf1a Mon Sep 17 00:00:00 2001 From: Serraniel Date: Fri, 5 Nov 2021 22:40:51 +0100 Subject: [PATCH] Small fix to compile ts again Old code was okay according to mdn: https://developer.mozilla.org/de/docs/Web/API/Document/createTreeWalker Typescript not liking it: https://github.com/microsoft/TypeScript/issues/33462#issuecomment-912517410 We fine with removing the params as it was optional at all and we set to false --- src/javascript/utils/helpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/javascript/utils/helpers.ts b/src/javascript/utils/helpers.ts index e9c01fd..84957ce 100644 --- a/src/javascript/utils/helpers.ts +++ b/src/javascript/utils/helpers.ts @@ -43,7 +43,7 @@ export function findTextNodes(baseNode: Node): Array { baseNode = document.documentElement; } - let walker = document.createTreeWalker(baseNode, NodeFilter.SHOW_TEXT, null, false); + let walker = document.createTreeWalker(baseNode, NodeFilter.SHOW_TEXT, null); let node; let results = []; while (node = walker.nextNode()) {