Fix sprite resize ratio

- This was actually a bug that @agmcleod found after looking over the whitespace changes.
- The `undefined` was changed to a string to correct the typeof() statement, but the logic was broken anyway! :)