From 7f878ef4721e8508eceabaef3d1dad710bf40059 Mon Sep 17 00:00:00 2001 From: emkael Date: Thu, 15 Nov 2018 12:26:25 +0100 Subject: Clearing default protocol if no tables is supported by it --- tdd/tdd-bootstrap.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tdd/tdd-bootstrap.php b/tdd/tdd-bootstrap.php index 1dbb368..04bbb0b 100644 --- a/tdd/tdd-bootstrap.php +++ b/tdd/tdd-bootstrap.php @@ -118,6 +118,11 @@ class Protocol { $table->find('tr', 0)->class = 'tdd-header'; // marking default header as navigable header for JS foreach ($groupedBoards as $boardId => $groupedBoard) { if ($boardId === 'default') { + // there are no tables for default hand record, clear the default table entirely (strip headers, footers etc.) + if (!$groupedBoard) { + $table->innertext = ''; + continue; + } $innerTable = $table->find('td/table', 0); $rows = $innerTable->find('tr'); $firstRow = array_shift($rows); // board record header (with the board number) -- cgit v1.2.3