Bug 1261505 - Use consistent syntax for prototype methods; r=jsantell
All the other methods use the style
{
myMethod() { ... }
}
while these two methods use
{
myMethod: function () { ... }
}
For consistency, we should use the common style here.
MozReview-Commit-ID: 5rg8uPoULyN
--- a/devtools/client/shared/components/tree.js
+++ b/devtools/client/shared/components/tree.js
@@ -364,26 +364,26 @@ const Tree = module.exports = createClas
}
}),
/**
* Sets the passed in item to be the focused item.
*
* @param {Object} item
*/
- _focus: function (item) {
+ _focus(item) {
if (this.props.onFocus) {
this.props.onFocus(item);
}
},
/**
* Sets the state to have no focused item.
*/
- _onBlur: function () {
+ _onBlur() {
this._focus(undefined);
},
/**
* Fired on a scroll within the tree's container, updates
* the stored position of the view port to handle virtual view rendering.
*
* @param {Event} e