Skip to content

Commit 5a85b54

Browse files
committed
Fix issue running tools without IDE
1 parent 13ab67b commit 5a85b54

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plugins/saveOnSend.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@
5656
function wrap(code, callback) {
5757
// convert any non-0..255 charcodes to UTF8 encoding
5858
code = Espruino.Core.Utils.asUTF8Bytes(code);
59-
// Depending on settings, choose how we package code for upload
59+
// Depending on settings, choose how we package code for upload (see Espruino.Core.Send.SEND_MODE_* constants)
6060
var isFlashPersistent = Espruino.Config.SAVE_ON_SEND == 2;
61-
var isStorageUpload = Espruino.Config.SAVE_ON_SEND == Espruino.Core.Send.SEND_MODE_STORAGE;
62-
var isSDCardUpload = Espruino.Config.SAVE_ON_SEND == Espruino.Core.Send.SEND_MODE_SDCARD;
63-
var isFlashUpload = Espruino.Config.SAVE_ON_SEND == Espruino.Core.Send.SEND_MODE_FLASH || isFlashPersistent || isStorageUpload;
61+
var isStorageUpload = Espruino.Config.SAVE_ON_SEND == 3;
62+
var isSDCardUpload = Espruino.Config.SAVE_ON_SEND == 4;
63+
var isFlashUpload = Espruino.Config.SAVE_ON_SEND == 1 || isFlashPersistent || isStorageUpload;
6464
if (!isFlashUpload && !isSDCardUpload) return callback(code);
6565

6666
var asJS = Espruino.Core.Utils.toJSONishString;

0 commit comments

Comments
 (0)