Sometimes, after a close() call, more than one event will arrive.
The first will be handled by calling xhr.abort() and xhr=undefined.
The second will skip that part and will fail on a TypeError: Cannot read property 'status' of undefined error.
We need to split the if clause to check first for CLOSED and later for null
Related to #12
Sometimes, after a
close()
call, more than one event will arrive.The first will be handled by calling
xhr.abort()
andxhr=undefined
. The second will skip that part and will fail on aTypeError: Cannot read property 'status' of undefined
error.We need to split the
if
clause to check first forCLOSED
and later fornull