thinkpixellab / PxLoader

PxLoader is a simple JavasScript library for creating preloaders and resource downloaders for HTML5 apps.
http://thinkpixellab.com/pxloader
1.11k stars 173 forks source link

PxLoaderImage throws exception when options is undefined #58

Closed srveit closed 8 years ago

srveit commented 8 years ago

This code used to work:

pxImage = new PxLoaderImage(src);

It now throws an exception as of version 1.1.1:

PxLoaderImage.js:24 Uncaught TypeError: Cannot read property 'origin' of undefined

A workaround is to pass in an empty options object:

pxImage = new PxLoaderImage(src, undefined, undefined, {});
joelfillmore commented 8 years ago

Duplicate of #58, should be fixed in v1.1.2

joelfillmore commented 8 years ago

@srveit - just realized that I had pushed v1.1.2 to GitHub but hadn't published to npm. Sorry, my mistake! Do an npm update and it should work now.

srveit commented 8 years ago

@joelfillmore Thanks!