Skip to content

Lazy load plugins #392

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

Merged
merged 2 commits into from
Oct 23, 2015
Merged

Lazy load plugins #392

merged 2 commits into from
Oct 23, 2015

Conversation

mattrobenolt
Copy link
Contributor

This defers the installation and loading of plugins until
Raven.install() is called.

Should fix up issues around #384 I believe, since it'll be less important.

@mattrobenolt mattrobenolt added this to the 1.2 milestone Oct 22, 2015
@mattrobenolt mattrobenolt force-pushed the plugins branch 2 times, most recently from 31a16c1 to 89d5bf0 Compare October 22, 2015 22:49
This defers the installationa nd loading of plugins until
`Raven.install()` is called.
mattrobenolt added a commit that referenced this pull request Oct 23, 2015
@mattrobenolt mattrobenolt merged commit 28c4c7f into master Oct 23, 2015
@mattrobenolt mattrobenolt deleted the plugins branch October 23, 2015 00:18
@@ -133,6 +134,12 @@ var Raven = {
install: function() {
if (isSetup() && !isRavenInstalled) {
TraceKit.report.subscribe(handleStackInfo);

// Install all of the plugins
each(plugins, function(_, plugin) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it redefine global _ var used by underscore or lodash?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would just be a local, and we're not using underscore or lodash inside this loop, so should be fine.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood.

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

Successfully merging this pull request may close these issues.

3 participants