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

while playing with recommender widget, noticed that underscore must be loaded globally - which is weird #2074

Open
romanchyla opened this issue Oct 15, 2020 · 2 comments

Comments

@romanchyla
Copy link
Contributor

Expected Behavior

'underscore' is normally imported by modules

Actual Behavior

https://github.com/adsabs/bumblebee/blob/master/src/js/widgets/facet/widget.js has no such import

yet _.debounce() calls probably succeed

Suggests '_' is a global variable. Which it (normally) shouldn't be (conflicts)

Steps to Reproduce

@thostetler
Copy link
Member

Yeah its always been a global, lodash/underscore add it to the global namespace by default. We don't explicitly add a shim for this in discovery.config. We could do that, but there are a number of places expecting a global, just like with Backbone and a few others -- I have them ignored by the linter here: https://github.com/adsabs/bumblebee/blob/master/.eslintrc.json
If we add in the shim, we'll have to refactor some to include '_' in the deps (preferred, but might be a pain).

@romanchyla
Copy link
Contributor Author

romanchyla commented Oct 15, 2020 via email

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