Skip to content

Commit

Permalink
#14 fixes stupid bug in first fix
Browse files Browse the repository at this point in the history
  • Loading branch information
noah10 committed Oct 19, 2023
1 parent ea9fe48 commit 47675b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion common/logger/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,14 @@ export class Logger {
const loggingInterval = setInterval(async () => {
await this.setStream();
const unsent = this.logEntries.splice(0);
const streamName = this.localStorage.getItem(streamKey);
let streamName = this.localStorage.getItem(streamKey);
// for some reason the stream name is occasionally
// undefined. Maybe issue with localStorage?
for (let i=0; i<3; i++) {
if (streamName !== undefined) break;

await this.setStream();
streamName = this.localStorage.getItem(streamKey);
await new Promise(res => setTimeout(res, 1000));
}

Expand Down

0 comments on commit 47675b7

Please sign in to comment.