From eb8aed02cd8baecae0c5ad95882338eeaaf56d2f Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Tue, 23 Jul 2024 04:22:43 +0100 Subject: [PATCH] HTML Reporter: Fix `this.element is undefined` in applyUrlParams() Follows-up e1e03e68df788c013a7ccdc8ec1cc4aff33ec600. Fixes https://github.com/qunitjs/qunit/issues/1785. --- src/core/reporters/HtmlReporter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/reporters/HtmlReporter.js b/src/core/reporters/HtmlReporter.js index da647067f..55adab039 100644 --- a/src/core/reporters/HtmlReporter.js +++ b/src/core/reporters/HtmlReporter.js @@ -441,7 +441,7 @@ export default class HtmlReporter { const applyButton = document.createElement('button'); applyButton.textContent = 'Apply'; applyButton.title = 'Re-run the selected test modules'; - DOM.on(applyButton, 'click', this.applyUrlParams); + DOM.on(applyButton, 'click', this.applyUrlParams.bind(this)); const resetButton = document.createElement('button'); resetButton.textContent = 'Reset';