You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@annotator.apache.org by ra...@apache.org on 2020/07/23 06:47:44 UTC
[incubator-annotator] 09/10: Fix lexical scope in switch case
This is an automated email from the ASF dual-hosted git repository.
randall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-annotator.git
commit f348d4dd87d362708157b3164be828eba6c766b4
Author: Randall Leeds <ra...@apache.org>
AuthorDate: Wed Jul 22 23:45:56 2020 -0700
Fix lexical scope in switch case
---
packages/dom/test/text-quote/match.test.ts | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/packages/dom/test/text-quote/match.test.ts b/packages/dom/test/text-quote/match.test.ts
index 78ef7a5..6ea5563 100644
--- a/packages/dom/test/text-quote/match.test.ts
+++ b/packages/dom/test/text-quote/match.test.ts
@@ -204,9 +204,10 @@ async function testMatcher(
function prettyNodeName(node: Node) {
switch (node.nodeType) {
- case Node.TEXT_NODE:
+ case Node.TEXT_NODE: {
const text = (node as Text).nodeValue || '';
return `#text "${text.length > 50 ? text.substring(0, 50) + '…' : text}"`;
+ }
case Node.ELEMENT_NODE:
return `<${(node as Element).tagName.toLowerCase()}>`;
default: