|
|
@@ -235,10 +235,14 @@ class BreadcrumbsHelper extends Helper
|
|
|
* - *innerAttrs* To provide attributes in case your separator is divided in two elements.
|
|
|
* All other properties will be converted as HTML attributes and will replace the *attrs* key in the template.
|
|
|
* If you use the default for this option (empty), it will not render a separator.
|
|
|
- * @return string The breadcrumbs trail
|
|
|
+ * @return string|null The breadcrumbs trail
|
|
|
*/
|
|
|
public function render(array $attributes = [], array $separator = [])
|
|
|
{
|
|
|
+ if (empty($this->crumbs)) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
$crumbs = $this->crumbs;
|
|
|
$crumbsCount = count($crumbs);
|
|
|
$templater = $this->templater();
|