Skip to content

Commit

Permalink
Remove Parameters header
Browse files Browse the repository at this point in the history
  • Loading branch information
lmd59 committed Aug 2, 2024
1 parent 1e0a3e1 commit dcb6d1f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/server/ndjsonWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,12 @@ ndjsonWorker.process(async job => {
return;
}

const insertions = ndjsonResources
.trim()
.split(/\n/)
.map(async resourceStr => {
const ndjsonLines = ndjsonResources.trim().split(/\n/);
if(ndjsonLines.length > 0 && JSON.parse(ndjsonLines[0]).resourceType === 'Parameters'){
// check first line for a Parameters header and remove if necessary
ndjsonLines.shift();
}
const insertions = ndjsonLines.map(async resourceStr => {
let data;
try {
data = JSON.parse(resourceStr);
Expand Down

0 comments on commit dcb6d1f

Please sign in to comment.