thinkpixellab / PxLoader

PxLoader is a simple JavasScript library for creating preloaders and resource downloaders for HTML5 apps.

Home Page:http://thinkpixellab.com/pxloader

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PxLoaderImage throws exception when options is undefined

srveit opened this issue · comments

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, {});

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

@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.