Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
schoero committed Aug 25, 2021
1 parent 8a3e34c commit 2c8f813
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/swissqrbill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -815,15 +815,15 @@ export class PDF extends ExtendedPDF.PDF {
//-- Additional information

if(this._data.additionalInformation !== undefined){
if(this._data.additionalInformation.length > 140){ throw new Error("AdditionalInfromation must be a maximum of 140 characters."); }
if(this._data.additionalInformation.length > 140){ throw new Error("AdditionalInformation must be a maximum of 140 characters."); }
if(typeof this._data.additionalInformation !== "string"){ throw new Error("AdditionalInformation must be a string."); }
}


//-- Message + Additional information

if(this._data.message !== undefined && this._data.additionalInformation !== undefined){
if(this._data.additionalInformation.length + this._data.message.length > 140){ throw new Error("Message and additionalInfromation combined must be a maximum of 140 characters."); }
if(this._data.additionalInformation.length + this._data.message.length > 140){ throw new Error("Message and additionalInformation combined must be a maximum of 140 characters."); }
}


Expand Down

0 comments on commit 2c8f813

Please sign in to comment.