Skip to content

Commit

Permalink
bar.js: avoid multiple init for bar links [Closes nette#239]
Browse files Browse the repository at this point in the history
thanks to @rolandtoth
  • Loading branch information
dg committed Jan 13, 2017
1 parent b0e5a3d commit 2e098b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Tracy/assets/Bar/bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,12 @@
draggedClass: 'tracy-dragged'
});

this.initTabs();
this.initTabs(this.elem);
this.restorePosition();
};

Bar.prototype.initTabs = function() {
var _this = this, elem = this.elem;
Bar.prototype.initTabs = function(elem) {
var _this = this;

forEach(elem.getElementsByTagName('a'), function(a) {
a.addEventListener('click', function(e) {
Expand Down

0 comments on commit 2e098b5

Please sign in to comment.