From 52ec8fbfc6da3695d98e83e222232aaa3b1dcf43 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 9 Mar 2022 20:56:56 +0000 Subject: Ignore w:u elements when w:val is missing --- lib/docx/body-reader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/docx/body-reader.js b/lib/docx/body-reader.js index 4bd38a9..61b198b 100644 --- a/lib/docx/body-reader.js +++ b/lib/docx/body-reader.js @@ -83,7 +83,7 @@ function BodyReader(options) { function readUnderline(element) { if (element) { var value = element.attributes["w:val"]; - return value !== "false" && value !== "0" && value !== "none"; + return value !== undefined && value !== "false" && value !== "0" && value !== "none"; } else { return false; } -- cgit v1.2.3