Skip to content

Commit c8964f1

Browse files
committed
Merge pull request #14 from juncaidf/patch-1
Set |port| as null when disconnected
2 parents d742b74 + 1d08669 commit c8964f1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

demos/rgb/rgb.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
port.disconnect();
4848
connectButton.textContent = 'Connect';
4949
statusDisplay.textContent = '';
50+
port = null;
5051
} else {
5152
serial.requestPort().then(selectedPort => {
5253
port = selectedPort;

0 commit comments

Comments
 (0)