Skip to content

Commit

Permalink
Merge pull request #39 from BoffinsDev/master
Browse files Browse the repository at this point in the history
Assertions
  • Loading branch information
Widdershin committed Mar 3, 2016
2 parents c825638 + 8250e59 commit d16b11d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/restartable.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,11 @@ export default function restartable (driver, opts = {}) {
newLog$.take(1).subscribe(newLog => {
function scheduleEvent (historicEvent) {
scheduler.scheduleAbsolute({}, historicEvent.time, () => {
streams[historicEvent.identifier].onNext(historicEvent.event);
if (streams[historicEvent.identifier]) {
streams[historicEvent.identifier].onNext(historicEvent.event);
} else {
console.error('Missing replay stream ', historicEvent.identifier)
}
});
}

Expand Down

0 comments on commit d16b11d

Please sign in to comment.