Skip to content

Commit

Permalink
fix: BHS or MSH (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bugs5382 authored Jan 8, 2024
2 parents d882b0c + b04bbfd commit 5b10dda
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pages/parser/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ you should know what your receiving on what port so getting the proper string ei
## Table of Contents

1. [Introduction](#introduction)
2. [basic Usage](#basic-usage)
2. [Basic Usage](#basic-usage)

## Basic Usage

Expand Down
4 changes: 2 additions & 2 deletions src/utils/normalizedBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@ export function normalizedClientMessageBuilderOptions (raw?: ClientBuilderMessag
export function normalizedClientBatchBuilderOptions (raw?: ClientBuilderOptions): ClientBuilderOptions {
const props: ClientBuilderOptions = { ...DEFAULT_CLIENT_BUILDER_OPTS, ...raw }

if (typeof props.text !== 'undefined' && props.text !== '' && props.text.slice(0, 3) !== 'BHS') {
throw new Error('text must begin with the BHS segment.')
if (typeof props.text !== 'undefined' && props.text !== '' && props.text.slice(0, 3) !== 'BHS' && props.text.slice(0, 3) !== 'MSH') {
throw new Error('text must begin with the BHS or MSH segment.')
}

if ((typeof props.newLine !== 'undefined' && props.newLine === '\\r') || props.newLine === '\\n') {
Expand Down

0 comments on commit 5b10dda

Please sign in to comment.