In either of the two cases where checkValidServiceWorker returns after determining that the SW is invalid (not a js content-type, or a 404 error), the SW will be unregistered, but then after the call to checkValidServiceWorker returns, the script will wait for the SW to be ready. Why wait for the SW to be ready when you've just unregistered it?
In either of the two cases where checkValidServiceWorker returns after determining that the SW is invalid (not a js content-type, or a 404 error), the SW will be unregistered, but then after the call to checkValidServiceWorker returns, the script will wait for the SW to be ready. Why wait for the SW to be ready when you've just unregistered it?
https://github.com/yyx990803/register-service-worker/blob/cedb35fdb41ef626e948211000fa3938fcf1e682/src/index.js#L33-L34
Is this intended or a bug?