Skip to content

Commit c58e83d

Browse files
authored
Fixed wrong static invocation of method to compute the file extension for ESP32 (#555)
1 parent 5346e4f commit c58e83d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/daemon.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export default class Daemon {
130130
})
131131
.then(result => result.json())
132132
.then(uploadCommandInfo => {
133-
let ext = this._extractExtensionFromCommandline(uploadCommandInfo.commandline);
133+
let ext = Daemon._extractExtensionFromCommandline(uploadCommandInfo.commandline);
134134
const data = compilationResult[ext] || compilationResult.bin;
135135
if (!ext || !data) {
136136
console.log('we received a faulty ext property, defaulting to .bin');
@@ -214,7 +214,7 @@ export default class Daemon {
214214
static _extractExtensionFromCommandline(commandline) {
215215
const rx = /\{build\.project_name\}\.(\w\w\w)\b/g;
216216
const arr = rx.exec(commandline);
217-
if (arr && arr.length) {
217+
if (arr && arr.length > 0) {
218218
return arr[1];
219219
}
220220
return null;

0 commit comments

Comments
 (0)