rikmms / progress-bar-4-axios

Slim progress bar (NProgress) for Web applications that use Axios library for HTTP requests
MIT License
246 stars 32 forks source link

Fix progress not ending when response is empty #18

Open brennop opened 4 years ago

brennop commented 4 years ago

When response data is empty, the request 'loaded' and 'total' values are 0, making calculatePercentage return NaN.

When nProgress receives that value, it accepts as a 'number' and brakes itself, preventing 'done()' from working.

Fixes #13

alxlion commented 3 years ago

Can we merge this PR please ?