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

niceScroll with requirejs #811

Open
IvanSivak opened this issue Aug 7, 2019 · 0 comments
Open

niceScroll with requirejs #811

IvanSivak opened this issue Aug 7, 2019 · 0 comments

Comments

@IvanSivak
Copy link

Hi there,

Just encountered this bug:

Mismatched anonymous define() modules

..when using the niceScroll with requirejs. According to requirejs site: https://requirejs.org/docs/errors.html#mismatch this can happen when e.g.:

If you use the loader plugins or anonymous modules (modules that call define() with no string ID) but do not use the RequireJS optimizer to combine files together, this error can occur.

So I changed this line from the beginning of the niceScroll plugin:

define(['jquery'], factory);

into:

define('niceScrollModule', ["jquery"], factory)

..and problem disappeared. Seems to be fixed. But can you please check if it's ok and if my fix won't destroy anything else? I'm sorry for not having code to reproduce. This has been a hot fix for me. Thanks

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

1 participant