8000 Merge pull request #13 from murilopolese/bugfix/close-connection · arduino/micropython.js@5d42cfd · GitHub
[go: up one dir, main page]

Skip to content

Commit 5d42cfd

Browse files
authored
Merge pull request #13 from murilopolese/bugfix/close-connection
Check if serial object exists before calling it
2 parents c50a968 + a8db719 commit 5d42cfd

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

micropython.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class MicroPythonBoard {
6969
}
7070

7171
close() {
72-
if (this.serial.isOpen) {
72+
if (this.serial && this.serial.isOpen) {
7373
return this.serial.close()
7474
} else {
7575
return Promise.resolve()

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "micropython.js",
3-
"version": "1.4.2",
3+
"version": "1.4.3",
44
"description": "Interpretation of pyboard.py in javascript",
55
"main": "micropython.js",
66
"scripts": {

0 commit comments

Comments
 (0)
0