From 6bc159be2a8dc460d179d8d4d2fc7cfeffbe2ae3 Mon Sep 17 00:00:00 2001 From: Scott Bender Date: Tue, 18 Jun 2024 10:41:54 -0400 Subject: [PATCH] fix: to-pgn does not support strings for manufacturer code (#272) --- lib/toPgn.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/lib/toPgn.js b/lib/toPgn.js index f5f0fc9..7986750 100644 --- a/lib/toPgn.js +++ b/lib/toPgn.js @@ -54,19 +54,6 @@ function toPgn(data) { const pgn_number = data.pgn var pgnData = pgnList[0] - if ( pgnList.length > 1 && data['Manufacturer Code'] ) { - pgnData = pgnList.find(pgn => { - let mc = pgn.Fields.find(field => (field.Name === 'Manufacturer Code')) - //console.log(`mc ${JSON.stringify(mc)}`) - return mc && mc.Match && mc.Match == data['Manufacturer Code'] - }) - if ( !pgnData ) - { - debug("no pgn found: " + data.pgn) - return undefined - } - } - var bs = new BitStream(Buffer.alloc(500)) if ( data.fields ) {