From 2fcdb256042438254c736d5c1055dc99c9b5fec9 Mon Sep 17 00:00:00 2001 From: slackr <1099208+slackr@users.noreply.github.com> Date: Mon, 7 Nov 2022 22:10:49 -0500 Subject: [PATCH] fix 'record is not defined' error --- encode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encode.js b/encode.js index d0aa06f..0a26b69 100644 --- a/encode.js +++ b/encode.js @@ -282,6 +282,6 @@ function flatten(state, element) { function pair_to_buf(pair) { // Convert a string of two hex bytes, e.g. "89ab" to a buffer. if(! pair.match(/^[0-9a-fA-F]{4}$/)) - throw new Error('Bad '+record.type+' record data: ' + JSON.stringify(record)) + throw new Error('Bad pair data: ' + pair) return new Buffer(pair, 'hex') }