We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8cfce14 commit be984e6Copy full SHA for be984e6
src/ObserverComponent/EventMapper.php
@@ -55,7 +55,10 @@ public function registerObserver(IObserverComponent $component) : void
55
public function dispatchEvent(IEvent $event) : void
56
{
57
$presenter = $this->application->getPresenter();
58
- \assert($presenter instanceof \Nette\Application\UI\Control);
+
59
+ if ($presenter === null) {
60
+ return;
61
+ }
62
63
foreach ($this->getObserverList(\get_class($event)) as $observerPath) {
64
\assert(\is_string($observerPath));
0 commit comments