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

Should check if window is defined #11

Open
Epenance opened this issue Dec 23, 2019 · 0 comments
Open

Should check if window is defined #11

Epenance opened this issue Dec 23, 2019 · 0 comments

Comments

@Epenance
Copy link

Sometimes you want to force a lazyload on an image, in case of a resize event or similar.

When trying to do this in Nuxt by taking the class instance and running the .lazyLoad function it will break even if put within a process.client check since we modify window outside of the class (See lines 14. 15: https://github.com/Novicell/novicell-lazyload/blob/master/js/lazy-images.js#L14)

I suggest we wrap the config init on window in a window check.

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

No branches or pull requests

1 participant