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

Clean up non-jquery use-case #230

Open
andrewjmead opened this issue Apr 3, 2017 · 1 comment
Open

Clean up non-jquery use-case #230

andrewjmead opened this issue Apr 3, 2017 · 1 comment

Comments

@andrewjmead
Copy link

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?

@Sebobo
Copy link
Member

Sebobo commented Apr 23, 2017

Sure a PR is always welcome!
Wonder what changed that this now creates an error. This code worked for a long time.

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

2 participants