Skip to content

Commit

Permalink
#2388 - Check for undefined rather than falsey
Browse files Browse the repository at this point in the history
  • Loading branch information
dolanmiu committed Dec 22, 2023
1 parent abbd695 commit 1346eed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/file/paragraph/properties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ export class ParagraphProperties extends IgnoreIfEmptyXmlComponent {
* Ensure there is only one w:tabs tag with multiple w:tab
*/
const tabDefinitions: readonly TabStopDefinition[] = [
...(options.rightTabStop ? [{ type: TabStopType.RIGHT, position: options.rightTabStop }] : []),
...(options.rightTabStop !== undefined ? [{ type: TabStopType.RIGHT, position: options.rightTabStop }] : []),
...(options.tabStops ? options.tabStops : []),
...(options.leftTabStop ? [{ type: TabStopType.LEFT, position: options.leftTabStop }] : []),
...(options.leftTabStop !== undefined ? [{ type: TabStopType.LEFT, position: options.leftTabStop }] : []),
];

if (tabDefinitions.length > 0) {
Expand Down

0 comments on commit 1346eed

Please sign in to comment.