Permalink
Browse files

MDL-40142 navigation: fixed chainable issue with navigation JS

  • Loading branch information...
1 parent eabe1d3 commit 5838cbd4ff0b592c522947c6c5eeb7863d9a7372 Sam Hemelryk committed Jun 12, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 blocks/navigation/yui/navigation/navigation.js
View
6 blocks/navigation/yui/navigation/navigation.js
@@ -340,11 +340,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.event_ajaxload = this.node.on('ajaxload|click', this.ajaxLoad, this);

0 comments on commit 5838cbd

Please sign in to comment.