diff --git a/src/html-reporter/html.js b/src/html-reporter/html.js
index 7b737b5c1..79968f16c 100644
--- a/src/html-reporter/html.js
+++ b/src/html-reporter/html.js
@@ -902,16 +902,15 @@ export function escapeText( s ) {
} );
QUnit.testDone( function( details ) {
- var testTitle, time, testItem, assertList, status,
+ var testTitle, time, assertList, status,
good, bad, testCounts, skipped, sourceName,
- tests = id( "qunit-tests" );
+ tests = id( "qunit-tests" ),
+ testItem = id( "qunit-test-output-" + details.testId );
- if ( !tests ) {
+ if ( !tests || !testItem ) {
return;
}
- testItem = id( "qunit-test-output-" + details.testId );
-
removeClass( testItem, "running" );
if ( details.failed > 0 ) {