Skip to content

Commit be984e6

Browse files
committed
Added support for CLI mode
1 parent 8cfce14 commit be984e6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ObserverComponent/EventMapper.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ public function registerObserver(IObserverComponent $component) : void
5555
public function dispatchEvent(IEvent $event) : void
5656
{
5757
$presenter = $this->application->getPresenter();
58-
\assert($presenter instanceof \Nette\Application\UI\Control);
58+
59+
if ($presenter === null) {
60+
return;
61+
}
5962

6063
foreach ($this->getObserverList(\get_class($event)) as $observerPath) {
6164
\assert(\is_string($observerPath));

0 commit comments

Comments
 (0)