diff --git a/lib/stomp.js b/lib/stomp.js index bb51546..48734b2 100644 --- a/lib/stomp.js +++ b/lib/stomp.js @@ -50,8 +50,16 @@ function parse_headers(raw_headers) { var header_val = header.join(':').trim(); headers[header_key] = header_val; continue; - } - headers[header[0].trim()] = header[1].trim(); + } else { + /** + * This was causing errors for me, + * unsure as to why it is placed here + * in the code anyway, as we have already + * tested the length of the array + * above. + */ + headers[header[0].trim()] = null; + } } return headers; };