Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions services/blackfire/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ module.exports = {
parent: '_service',
builder: (parent, config) => class LandoBlackfire extends parent {
constructor(id, options = {}) {
// set a default app_service using the first service in options._app.info
if (options._app.hasOwnProperty('info') && options._app.info instanceof Array) {
const closestService = _.first(options._app.info);
//now double-check to make sure the service object exists in config services.
if(options._app.config.services.hasOwnProperty(closestService.service)) {
config.app_service = closestService.service;
}
Comment on lines +27 to +31
Copy link
Contributor

Choose a reason for hiding this comment

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

WS alignment 😉

Suggested change
const closestService = _.first(options._app.info);
//now double-check to make sure the service object exists in config services.
if(options._app.config.services.hasOwnProperty(closestService.service)) {
config.app_service = closestService.service;
}
const closestService = _.first(options._app.info);
// now double-check to make sure the service object exists in config services.
if(options._app.config.services.hasOwnProperty(closestService.service)) {
config.app_service = closestService.service;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

my bad. Was using a different IDE from my preferred. Do we have a .editorconfig file we use to ensure proper spacing?

}
options = _.merge({}, config, options);

// Ensure that the credentials are correctly set.
Expand Down