From 954211d736386bebca30393e63481e04af429878 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 19 Nov 2016 18:13:47 +0000 Subject: Simplify reading of verticalAlignment --- lib/docx/body-reader.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/docx/body-reader.js b/lib/docx/body-reader.js index 6bc1934..61dc79d 100644 --- a/lib/docx/body-reader.js +++ b/lib/docx/body-reader.js @@ -38,10 +38,7 @@ function BodyReader(options) { type: "runProperties" }; - var verticalAlignmentElement = element.first("w:vertAlign"); - if (verticalAlignmentElement) { - properties.verticalAlignment = verticalAlignmentElement.attributes["w:val"]; - } + properties.verticalAlignment = element.firstOrEmpty("w:vertAlign").attributes["w:val"]; properties.font = element.firstOrEmpty("w:rFonts").attributes["w:ascii"]; properties.isBold = readBooleanElement(element.first("w:b")); properties.isUnderline = readBooleanElement(element.first("w:u")); -- cgit v1.2.3