summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-11-15 12:26:25 +0100
committeremkael <emkael@tlen.pl>2018-11-15 12:26:25 +0100
commit7f878ef4721e8508eceabaef3d1dad710bf40059 (patch)
tree0db80fad4a93d294cc6795329aab2e629ba03706
parentd1a50c119db7356671af310cf04a046e2be2fc90 (diff)
Clearing default protocol if no tables is supported by it
-rw-r--r--tdd/tdd-bootstrap.php5
1 files changed, 5 insertions, 0 deletions
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)