Skip to content

Commit f085275

Browse files
committed
Skip result if null title returned
1 parent d5e2794 commit f085275

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function getTitle($hit)
3333
return [$hit['hierarchy']['lvl1'], 1];
3434
}
3535

36-
return null;
36+
return [null, null];
3737
}
3838

3939
function getSubtitle($hit, $titleLevel)

tailwindcss.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@
3232

3333
foreach ($results as $hit) {
3434
list($title, $titleLevel) = getTitle($hit);
35+
36+
if ($title === null) {
37+
continue;
38+
}
39+
3540
$title = html_entity_decode($title);
3641

3742
$workflow->result()

v0_tailwindcss.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@
3232

3333
foreach ($results as $hit) {
3434
list($title, $titleLevel) = getTitle($hit);
35+
36+
if ($title === null) {
37+
continue;
38+
}
39+
3540
$title = html_entity_decode($title);
3641

3742
$workflow->result()

v1_tailwindcss.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@
3232

3333
foreach ($results as $hit) {
3434
list($title, $titleLevel) = getTitle($hit);
35+
36+
if ($title === null) {
37+
continue;
38+
}
39+
3540
$title = html_entity_decode($title);
3641

3742
$workflow->result()

0 commit comments

Comments
 (0)