louisremi/background-size-polyfill — pull request #52 by danielshorten (2014-06-30 17:48:38+00:00)
Title: Check for undefined explicitly

I was having a problem similar to issue #11. I'm using a Bootstrap carousel and non-visible images seem to have zero values for innerWidth and innerHeight, so they are getting a display: none style applied. This may be expected behaviour, but it results in invisible images when the carousel is rotated until the browser window is resized. This patch solves my problem.

I'm not sure which invalid condition this if statement is trying to avoid. Perhaps !isNan() would be a better check.