Skip to content

Commit

Permalink
fix js error
Browse files Browse the repository at this point in the history
  • Loading branch information
g3gg0 committed Oct 3, 2023
1 parent c55aaf6 commit 7939d06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/data/www/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2153,6 +2153,7 @@ <h3>Encode to {this.props.path}</h3>
this.setState({ progress: prog });
});

await port.close();
this.setState({ state: `Reading finished`, progress: 100, originalFlash: flashData, connected: false });
} catch (err) {
this.setState({ state: `Failed to communicate: ${err.message}`, connected: false });
Expand All @@ -2161,10 +2162,9 @@ <h3>Encode to {this.props.path}</h3>
await port.close();
return;
}
await port.close();

const sanitizedName = `ESP32_${mac.replace(/:/g, "")}`;
uploadFlashData(flashData, sanitizedName);
await this.uploadFlashData(flashData, sanitizedName);
}

async uploadFlashData(flashData, sanitizedName) {
Expand Down

0 comments on commit 7939d06

Please sign in to comment.