We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3902f14 commit c413cb8Copy full SHA for c413cb8
espruino.js
@@ -105,7 +105,10 @@ var Espruino;
105
var n = 0;
106
var cbCalled = false;
107
var cb = function(inData) {
108
- if (cbCalled) throw new Error("Internal error in "+eventType+" processor. Callback is called TWICE.");
+ if (cbCalled) {
109
+ throw new Error("Internal error in "+eventType+" processor. Callback is called TWICE.");
110
+ return;
111
+ }
112
cbCalled = true;
113
if (n < p.length) {
114
cbCalled = false;
0 commit comments