From 2927c672996fb2b10cb197cd75f9677363bb5d9c Mon Sep 17 00:00:00 2001 From: Dan Ghost Date: Fri, 21 Apr 2023 12:07:34 +0100 Subject: [PATCH] Fix: for multiple instances when switching languages (fixes #13) --- js/adapt-homeButton.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/adapt-homeButton.js b/js/adapt-homeButton.js index 7e3c720..0f8ddc6 100644 --- a/js/adapt-homeButton.js +++ b/js/adapt-homeButton.js @@ -14,6 +14,7 @@ class HomeButton extends Backbone.Controller { const config = Adapt.config.get('_homeButton'); if (config?._isEnabled === false) return; this.$html = $('html'); + this.stopListening(); this.listenTo(Adapt, { remove: this.disable, 'router:menu router:page': this.onRouterEvent,