[go: nahoru, domu]

Skip to content

Commit

Permalink
HTML Reporter: Remove unused internal trim() fallack for IE9
Browse files Browse the repository at this point in the history
Follows-up 775c069, #1725.
  • Loading branch information
Krinkle committed Jun 17, 2024
1 parent 1563b4f commit 77f1d90
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/html-reporter/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,6 @@ const stats = {
});
let dropdownData = null;

function trim (string) {
if (typeof string.trim === 'function') {
return string.trim();
} else {
return string.replace(/^\s+|\s+$/g, '');
}
}

function addEvent (elem, type, fn) {
elem.addEventListener(type, fn, false);
}
Expand Down Expand Up @@ -79,7 +71,7 @@ const stats = {
}

// Trim for prettiness
elem.className = trim(set);
elem.className = set.trim();
}

function id (name) {
Expand All @@ -99,7 +91,7 @@ const stats = {
function interceptNavigation (ev) {
// Trim potential accidental whitespace so that QUnit doesn't throw an error about no tests matching the filter.
const filterInputElem = id('qunit-filter-input');
filterInputElem.value = trim(filterInputElem.value);
filterInputElem.value = filterInputElem.value.trim();

applyUrlParams();

Expand Down

0 comments on commit 77f1d90

Please sign in to comment.