Skip to content

Commit

Permalink
don't use ??
Browse files Browse the repository at this point in the history
  • Loading branch information
ckoegel committed Sep 24, 2024
1 parent 9693a66 commit 7b73285
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions models/bxml/Verb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { XMLBuilder, XMLWriterOptions } from 'xmlbuilder2/lib/interfaces';
*/
export class Verb {
name: string;
content: string;
attributes: object;
content: string | undefined;
attributes: object | undefined;

/**
* Creates an instance of Verb
Expand All @@ -19,15 +19,16 @@ export class Verb {
*/
constructor(name: string, content?: string, attributes?: object) {
this.name = name;
this.content = content ?? '';
this.attributes = attributes ?? {};
this.content = content;
this.attributes = attributes;
}

/**
* Generate an XML element for the verb
*/
generateXml(): XMLBuilder {
const xml = create().ele(this.name, this.attributes).txt(this.content);
const xml = create().ele(this.name, this.attributes);
if (this.content) { xml.txt(this.content); }
return xml;
}

Expand Down

0 comments on commit 7b73285

Please sign in to comment.