Permalink
Browse files

MDL-40142 navigation: fixed chainable issue with navigation JS

  • Loading branch information...
1 parent d3cf194 commit 5d9349b61abb508eb15742b64c327196ddb678ed Sam Hemelryk committed Jun 12, 2013
@@ -391,11 +391,15 @@ BRANCH.prototype = {
},
/**
* Attaches required events to the branch structure.
+ *
+ * @chainable
+ * @method wire
+ * @return {BRANCH} This function is chainable, it always returns itself.
*/
wire : function() {
this.node = this.node || Y.one('#'+this.get('id'));
if (!this.node) {
- return false;
+ return this;
}
if (this.get('expandable')) {
this.node.setAttribute('data-expandable', '1');

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -391,11 +391,15 @@ BRANCH.prototype = {
},
/**
* Attaches required events to the branch structure.
+ *
+ * @chainable
+ * @method wire
+ * @return {BRANCH} This function is chainable, it always returns itself.
*/
wire : function() {
this.node = this.node || Y.one('#'+this.get('id'));
if (!this.node) {
- return false;
+ return this;
}
if (this.get('expandable')) {
this.node.setAttribute('data-expandable', '1');
@@ -389,11 +389,15 @@ BRANCH.prototype = {
},
/**
* Attaches required events to the branch structure.
+ *
+ * @chainable
+ * @method wire
+ * @return {BRANCH} This function is chainable, it always returns itself.
*/
wire : function() {
this.node = this.node || Y.one('#'+this.get('id'));
if (!this.node) {
- return false;
+ return this;
}
if (this.get('expandable')) {
this.node.setAttribute('data-expandable', '1');

0 comments on commit 5d9349b

Please sign in to comment.