Skip to content

Should check if window is defined #11

@Epenance

Description

@Epenance

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions