Skip to content

Commit

Permalink
The poll logger needs to handle empty frames.
Browse files Browse the repository at this point in the history
  • Loading branch information
DingoEatingFuzz committed May 24, 2018
1 parent c42a07b commit 672c6d9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui/app/utils/classes/poll-logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ export default EmberObject.extend(AbstractLogger, {

if (text) {
const lines = text.replace(/\}\{/g, '}\n{').split('\n');
const frames = lines.map(line => JSON.parse(line));
const frames = lines
.map(line => JSON.parse(line))
.filter(frame => frame.Data && frame.Offset);
frames.forEach(frame => (frame.Data = window.atob(frame.Data)));

this.set('endOffset', frames[frames.length - 1].Offset);
Expand Down

0 comments on commit 672c6d9

Please sign in to comment.