Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with bLazy 1.4 an jQuery #60

Closed
dcac opened this issue Oct 7, 2015 · 5 comments
Closed

Error with bLazy 1.4 an jQuery #60

dcac opened this issue Oct 7, 2015 · 5 comments

Comments

@dcac
Copy link

dcac commented Oct 7, 2015

Hi,

When I try to implement bLazy 1.4, I get the following error:

TypeError: undefined is not an object (evaluating 'a.error')
(anonymous function)blazy.min.js:5:2314
(anonymous function)localhost:1:40400
cjquery-1.11.1.min.js:3:28654
fireWithjquery-1.11.1.min.js:4:1939
readyjquery-1.11.1.min.js:4:3794
sjquery-1.11.1.min.js:2:30257

bLazy 1.3.1 still works fine, so I'm wondering if there is some way to tweak teh script to resolve this error.

Thanks for any help!

@dinbror
Copy link
Owner

dinbror commented Oct 7, 2015

hey @dcac .

I can't reproduce the error. Works fine with jquery 1.11.1 here. Do you have a live example or can you post your code?

@dinbror
Copy link
Owner

dinbror commented Oct 10, 2015

Others who can reproduce?

@tsamu
Copy link

tsamu commented Oct 12, 2015

same here (jquery-2.1.3.min.js)

var bLazy = new Blazy();

after this: scope.options = options || {};
scope.options is undefined

scope.options.error = options.error || false; throws the error

fix:
options = options || {};
scope.options = options;

@dinbror
Copy link
Owner

dinbror commented Oct 12, 2015

Fixed in version 1.4.1. Thanks for reporting

@dinbror dinbror closed this as completed Oct 12, 2015
@dinbror
Copy link
Owner

dinbror commented Oct 12, 2015

Hey @tsamu. Thanks. The issue is that options is undefined. I should use scope.options instead:

scope.options.error = scope.options.error || false;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants