mpetazzoni/sse.js

this._checkStreamClosed Is Receiving A Null xhr in Firefox Only

Closed this issue · 7 comments

Line 165 of sse.js throws an error in firefox only because this.xhr is null and it's trying to get the readyState.

I think it's happening because line 192 sets this.xhr to null and that's triggering a readystatechange event which hits the checkStreamClosed callback. Why it's happening only in firefox, I have no clue.

muety commented

Same problem here.

@ToucanBran @muety Thanks for the report! It's unlikely that I would have time to look into that any time soon; would one of you have the time to propose a bug fix?

@mpetazzoni sure, I'll put in a PR, seems like an easy null check. I'll just need permission to push to the repo

muety commented

@ToucanBran Very cool, thanks. And I don't think you need permission to open a PR, btw 😉

@mpetazzoni has this fixed been released yet?

It's been merged, but not released. Let me take care of that.

@ToucanBran Done, released and published v0.4.5 (https://www.npmjs.com/package/sse.js).