- Issue created by @finex
It seems that the new toc_api 2.x version has an issue with Layout Builder, as the getCurrentToc() method returns a null value.
TypeError: Drupal\toc_api\Plugin\Block\TocBlockBase::getCurrentToc(): Return value must be of type Drupal\toc_api\TocInterface, null returned in Drupal\toc_api\Plugin\Block\TocBlockBase->getCurrentToc()
I also noticed that the getCurrentNode() function checks the route name, but it doesn't account for Layout Builder paths.
I've marked this as a major priority because it breaks the Layout Builder experience.
Active
2.0
Code