Skip to content

Commit 8f01e24

Browse files
authored
Solved Multiple StatsWindow instances created when clicking the "Display statistics" button repeatedly (#4558)
1 parent aceb144 commit 8f01e24

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

js/activity.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -5784,7 +5784,9 @@ class Activity {
57845784
};
57855785

57865786
const doAnalytics = (activity) => {
5787-
activity.statsWindow = new StatsWindow(activity);
5787+
if (!activity.statsWindow || !activity.statsWindow.isOpen) {
5788+
activity.statsWindow = new StatsWindow(activity);
5789+
}
57885790
};
57895791

57905792
/*

0 commit comments

Comments
 (0)