We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c21336 commit 0553a89Copy full SHA for 0553a89
js/comms.js
@@ -541,14 +541,18 @@ ${Const.CONNECTION_DEVICE}.print("\\xFF");
541
Puck lib we just copy in the default handler here. */
542
if (callback===undefined) {
543
connection.on("data", function(d) { // the default handler
544
- connection.received += d;
545
- connection.hadData = true;
+ if (!Puck.RECEIVED_NOT_IN_DATA_HANDLER) {
+ connection.received += d;
546
+ connection.hadData = true;
547
+ }
548
if (connection.cb) connection.cb(d);
549
});
550
} else {
551
connection.on("data", function(d) {
552
553
554
555
556
557
callback(d);
558
0 commit comments