8000 Merge pull request #3 from arduino/bugfix/data-consumer-checks · arduino/micropython.js@e667737 · GitHub
[go: up one dir, main page]

Skip to content

Commit e667737

Browse files
authored
Merge pull request #3 from arduino/bugfix/data-consumer-checks
Bugfix/data consumer checks
2 parents 418c811 + dd779c2 commit e667737

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

micropython.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ class MicroPythonBoard {
189189
}
190190

191191
async execfile(filePath, data_consumer) {
192+
data_consumer = data_consumer || function() {}
192193
if (filePath) {
193194
const content = fs.readFileSync(path.resolve(filePath))
194195
await this.enter_raw_repl()
@@ -302,6 +303,7 @@ class MicroPythonBoard {
302303
}
303304

304305
async fs_save(content, dest, data_consumer) {
306+
data_consumer = data_consumer || function() {}
305307
if (content && dest) {
306308
content = fixLineBreak(content)
307309
await this.enter_raw_repl()

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.3.0",
3+
"version": "1.3.1",
44
"description": "Interpretation of pyboard.py in javascript",
55
"main": "micropython.js",
66
"scripts": {

0 commit comments

Comments
 (0)
0