From 2e098b526113589527454e00b49f1906f2aa0a85 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Mon, 9 Jan 2017 01:08:23 +0100 Subject: [PATCH] bar.js: avoid multiple init for bar links [Closes #239] thanks to @rolandtoth --- src/Tracy/assets/Bar/bar.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Tracy/assets/Bar/bar.js b/src/Tracy/assets/Bar/bar.js index 45a9d75c3..1964857b1 100755 --- a/src/Tracy/assets/Bar/bar.js +++ b/src/Tracy/assets/Bar/bar.js @@ -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) {