Skip to content

Conversation

@tortillaj
Copy link

No description provided.

table.text('description');
table.string('name');
table.string('plugin');
// @todo: do we want this to be an enum, or leave it open to more statuses?
Copy link
Author

Choose a reason for hiding this comment

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

My inclination is to just leave it open so that new plugins created in the main probo project don't also need a sibling PR in this project too.

@kleinmp kleinmp force-pushed the feature/rethink-migration branch from 1464ed4 to 4700a6c Compare April 3, 2018 15:44
lib/Api.js Outdated
}

updateObject(req, res, next) {
let self = this;
Copy link
Author

Choose a reason for hiding this comment

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

@kleinmp @dzink - Your default variable declaration should be const instead of let. In JS, const is still bound by function scope (really any block scope - e.g. var is not bound by if statements but const and let are), it can't leak out of this scope. It does not mean the same thing in JS as it does in PHP or other languages.

The reason to use const by default is to ensure the variable binding remains the same. let can be redefined within a scope, whereas const cannot. Defaulting to const requires you to think about if you want this variable to be reboundable to something different. 95% of the time, you never want to reuse the same variable name within one scope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants