Bug 1261505 - Use consistent syntax for prototype methods; r=jsantell
authorNick Fitzgerald <fitzgen@gmail.com>
Fri, 01 Apr 2016 19:03:47 -0700
changeset 291468 41d126344f3d794d7f81ea9f6d9ce50cabc4a3fa
parent 291467 82a40128b81b1ec85c55933a0baa9e7f0b8e148b
child 291469 d080043beed9d866ef0e5591e5c23b243d10992e
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjsantell
bugs1261505
milestone48.0a1
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
devtools/client/shared/components/tree.js
--- 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