Skip to content

Clean up non-jquery use-case #230

Open
@andrewjmead

Description

@andrewjmead

Hey Folks,

The docs mentioned that this plugin can be used without jQuery. That does seem to be the case, but I had to modified the final line of the plugin where jQuery is passed into the IIFE. That reference will cause the following error if jQuery is not defined:

wookmark.js:783 Uncaught ReferenceError: jQuery is not defined

I was able to fix this by swapping out the last line:

// Current line
})(jQuery);

// Tweaked line
})(typeof jQuery === 'undefined' ? undefined : jQuery);

This fixes the issue and everything else seems to be working great.

Would you be open to a PR that fixes this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions