This commit fixes IE throwing 'unhandled promise rejection' when the Promise is rejected.
IE11 sometimes reports cached images as image.complete, but naturalWidth and naturalHeight = 0. A few ms later it will get the dimensions correct, so check a few times before rejecting it.
This commit fixes IE throwing 'unhandled promise rejection' when the Promise is rejected.
IE11 sometimes reports cached images as image.complete, but naturalWidth and naturalHeight = 0. A few ms later it will get the dimensions correct, so check a few times before rejecting it.