Skip to content

Commit

Permalink
Add note about (this.versionReceived || first === REPORT_VERSION) c…
Browse files Browse the repository at this point in the history
…ondition
  • Loading branch information
rwaldron committed Mar 13, 2016
1 parent fc8514a commit 061e2c4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/firmata.js
Expand Up @@ -604,6 +604,8 @@ function Board(port, options, callback) {
if (MIDI_RESPONSE[response]) {
// It's ok that this.versionReceived will be set to
// true every time a valid MIDI_RESPONSE is received.
// This condition is necessary to ensure that REPORT_VERSION
// is called first.
if (this.versionReceived || first === REPORT_VERSION) {
this.versionReceived = true;
MIDI_RESPONSE[response](this);
Expand Down

0 comments on commit 061e2c4

Please sign in to comment.