mkg20001 / socket.io-pull-stream

Pull Streams for socket.io
2 stars 1 forks source link

Check for error before checking for data end #3

Closed AquiGorka closed 6 years ago

AquiGorka commented 6 years ago

I was getting an error in the lines of: "cannot read end of undefined" which meant data was undefined. Maybe this was happening because an error was being sent but the check for it happened after trying to access data.end

I changed this locally and the error stopped.

codecov[bot] commented 6 years ago

Codecov Report

Merging #3 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master       #3   +/-   ##
=======================================
  Coverage   89.88%   89.88%           
=======================================
  Files           1        1           
  Lines          89       89           
=======================================
  Hits           80       80           
  Misses          9        9
Impacted Files Coverage Δ
src/index.js 89.88% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update a60a56d...753b1f0. Read the comment docs.

mkg20001 commented 6 years ago

Thanks!

AquiGorka commented 6 years ago

I assume you'll update js-libp2p-websocket-star and we'll have to ask js-ipfs to update accordingly.

mkg20001 commented 6 years ago

I think there is no need to update that there as it's currently being rewritten anyways PR: https://github.com/libp2p/js-libp2p-websocket-star/pull/43 - just waiting for that to get reviewed

AquiGorka commented 6 years ago

Oh, ok. Thanks.