From c19a9d821ad6961175ac2cd5a77f517739e590f5 Mon Sep 17 00:00:00 2001 From: digimo Date: Sat, 23 Mar 2019 00:50:45 +0000 Subject: [PATCH] create a clone of the input data array at row 0 prior to swapping elements --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index cf762b5..3786051 100644 --- a/index.js +++ b/index.js @@ -48,7 +48,7 @@ function MLLPServer(host, port, logger) { //get message ID var msg_id = data[0][10]; - var header = [data[0]]; + var header = [data[0].slice()]; //switch around sender/receiver names header[0][3] = data[0][5];