optolink-bridge 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -150,7 +150,7 @@ const packetQueue = async.queue(async task => {
|
|
|
150
150
|
trace && console.log(dateTimeString(), directionName(task.direction), (task.data ?? encodePacket(task.packet, task.direction & fromOpto)).toString('hex'));
|
|
151
151
|
|
|
152
152
|
const packet = task.packet ?? parsePacket(task.data, task.direction & fromOpto);
|
|
153
|
-
if (packet.rest) {
|
|
153
|
+
if (packet.rest?.length) {
|
|
154
154
|
// if there is any rest, two packets have been sent in the same direction, so unshift the rest as the next packet to the queue
|
|
155
155
|
packetQueue.unshift({ data: packet.rest, direction: task.direction });
|
|
156
156
|
}
|
package/package.json
CHANGED