dinbror / blazy

Hey, be lazy! bLazy.JS is a lightweight pure JavaScript script for lazy loading and multi-serving images. It's working in all modern browsers including IE7+.
http://dinbror.dk/blazy
MIT License
2.63k stars 354 forks source link

Uncaught TypeError: Cannot read property 'error' of undefined #63

Closed lifeisfoo closed 9 years ago

lifeisfoo commented 9 years ago

Using these code

<script type="text/javascript" src="https://cdn.jsdelivr.net/blazy/1.4.1/blazy.min.js"></script>
<script>
    ;(function() {
        // Initialize
        var bLazy = new Blazy();
    })();
</script>

will thrown this error: Uncaught TypeError: Cannot read property 'error' of undefined. Even with no elements in use. Even with 1.4.0.

dinbror commented 9 years ago

Hey @lifeisfoo . I see. The bug was introduced in version 1.4.0 and fixed in version 1.4.1. Sadly I didn't manage to update the minified version properly :( I have updated the minified version here at github and will release a new version soon.

Thanks for reporting

lifeisfoo commented 9 years ago

When you plan to release it (1.4.2?) on the CDN? I'm building a website using it and I'm going live in days :).

Thank you for your work.

dinbror commented 9 years ago

Fixed in v. 1.5.0